/* Apple-inspired CSS with smooth animations and responsive design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background-color: #f5f5f7;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.nav-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #007aff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007aff;
    border-radius: 1px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #1d1d1f;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 122, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(52, 199, 89, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff 0%, #007AFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    font-weight: 500;
}

/* About Section */
.about {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.about h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 80px;
    color: #1a1a2e;
    font-weight: 700;
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #007AFF 0%, #00d4ff 100%);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
    padding: 40px 30px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #007AFF 0%, #00d4ff 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.15);
}

.feature:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: #1a1a2e;
    font-weight: 600;
}

.feature p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 15px;
}

.cta-section {
    text-align: center;
    margin-top: 80px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    border-radius: 20px;
    color: white;
}

.cta-section h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

.btn-outline.btn-large {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline.btn-large:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0056cc;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover {
    background: #e8e8ed;
}

.btn-success {
    background: #34c759;
    color: white;
}

.btn-success:hover {
    background: #28a745;
}

.btn-green {
    background: #2da44e;
    color: white;
    font-weight: 500;
}

.btn-green:hover {
    background: #2c974b;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ff3b30;
    color: white;
}

.btn-danger:hover {
    background: #d70015;
}

.btn-outline {
    background: transparent;
    color: #007aff;
    border: 1px solid #007aff;
}

.btn-outline:hover {
    background: #007aff;
    color: white;
}

.btn-link {
    background: none;
    color: #007aff;
    text-decoration: none;
    padding: 8px 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row-vendor-exam {
    grid-template-columns: 1fr 2fr;
}

.form-row-domain-format {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.form-row-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.ai-parameters-section .form-row {
    margin-bottom: 0;
}

.form-actions-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    align-items: end;
    justify-content: flex-end;
}

.ai-parameters-section .form-actions-inline {
    margin-top: 0;
}

.ai-parameters-section .form-actions-inline .form-group {
    margin-bottom: 0;
}

/* AI Parameters Section */
.ai-parameters-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-top: 20px;
    margin-bottom: 5px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 5px;
}

#view-section .form-group {
    margin-bottom: 25px;
}

#view-section #hideAnswerBtn {
    margin-top: 25px;
}

#view-section #questionText {
    font-size: 1.25rem;
    /* font-weight: 600; */
    line-height: 1.5;
}

/* Font size variations */
#view-section.font-small #questionText {
    font-size: 1rem;
}

#view-section.font-small .answer-choice {
    font-size: 14px;
}

#view-section.font-medium #questionText {
    font-size: 1.25rem;
}

#view-section.font-medium .answer-choice {
    font-size: 16px;
}

#view-section.font-large #questionText {
    font-size: 1.5rem;
}

#view-section.font-large .answer-choice {
    font-size: 18px;
}

#view-section.font-small .choice-label {
    font-size: 14px;
}

#view-section.font-medium .choice-label {
    font-size: 16px;
}

#view-section.font-large .choice-label {
    font-size: 18px;
}

/* Mock test font size variations */
.mock-question.font-small .question-content h3 {
    font-size: 1rem;
}

.mock-question.font-small .answer-choice {
    font-size: 14px;
}

.mock-question.font-medium .question-content h3 {
    font-size: 1.25rem;
}

.mock-question.font-medium .answer-choice {
    font-size: 16px;
}

.mock-question.font-large .question-content h3 {
    font-size: 1.5rem;
}

.mock-question.font-large .answer-choice {
    font-size: 18px;
}

.mock-question.font-small .choice-label {
    font-size: 14px;
}

.mock-question.font-medium .choice-label {
    font-size: 16px;
}

.mock-question.font-large .choice-label {
    font-size: 18px;
}

.question-id {
    margin-bottom: 15px;
    font-weight: 500;
    color: #1d1d1f;
}

.star-flag {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
}

.star-flag:hover {
    transform: scale(1.1);
}

.star-flag[data-flagged="true"] svg path {
    fill: #FFD700;
}

.form-group label {
    display: block;
    margin-bottom: 0px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-control {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
}

textarea {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.toggle-group {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d2d2d7;
}

.toggle-btn {
    flex: 1;
    padding: 6px 12px;
    background: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid #d2d2d7;
    font-size: 14px;
    line-height: 1.5;
}

.toggle-btn:last-child {
    border-right: none;
}

.toggle-btn.active {
    background: #007aff;
    color: white;
}

.toggle-btn:hover:not(.active) {
    background: #f5f5f7;
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    justify-content: flex-end;
}

/* Mode Toggle Section */
.mode-toggle-section {
    margin: 80px 0 20px;
    display: flex;
    justify-content: center;
}

.mode-toggle-section .toggle-group {
    width: auto;
    min-width: 300px;
}

.mode-toggle-section .toggle-btn {
    font-size: 16px;
    padding: 10px 20px;
    font-weight: 500;
}

/* Sections */
.generation-section,
.question-section,
.search-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0 30px;
    padding-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.generation-section h2,
.search-section h2 {
    margin-bottom: 5px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.question-section {
    margin-top: 0px;
}

.search-section {
    margin-top: 40px;
}

.question-details {
    border-top: 1px solid #d2d2d7;
    padding-top: 30px;
    margin-top: 30px;
}

.stats-group {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item label {
    display: block;
    font-size: 14px;
    color: #86868b;
    margin-bottom: 5px;
}

.stat-item span {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
}

.stat-item .star-flag {
    margin-top: 10px;
}

#imageUpload {
    max-width: 500px;
}

.question-display {
    padding: 12px;
    background: #f5f5f7;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    font-size: 14px;
    line-height: 1.5;
    min-height: 44px;
}

.explanation-display {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    font-size: 14px;
    line-height: 1.6;
    min-height: 44px;
}

.explanation-display p {
    margin: 0 0 10px 0;
}

.explanation-display ul,
.explanation-display ol {
    margin: 10px 0;
    padding-left: 20px;
}

.explanation-display img {
    max-width: 600px;
    height: auto;
    display: block;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
}

.explanation-display img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.view-text {
    font-size: 16px;
    line-height: 1.6;
    color: #1d1d1f;
    margin-bottom: 0;
}

.answer-choice {
    font-size: 16px;
}

.answer-prefix {
    font-weight: 600;
    color: #007aff;
    margin-right: 8px;
}

.answer-text {
    color: #1d1d1f;
}

.choice-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 16px;
}

.choice-label {
    font-weight: 600;
    color: #1d1d1f;
    min-width: 24px;
    font-size: 16px;
    padding-top: 8px;
    line-height: 1;
    text-align: center;
}

.mock-actions label {
    margin-bottom: 0;
    font-weight: 500;
    color: #1d1d1f;
}

/* Table */
.table-section {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.questions-table {
    width: 100%;
    border-collapse: collapse;
}

.questions-table th,
.questions-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f5f5f7;
    font-size: 14px;
}

.questions-table th {
    background: #f5f5f7;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 16px;
}

.questions-table tbody tr {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.questions-table tbody tr:hover {
    background: #f5f5f7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

/* Mock Test */
.mock-header {
    text-align: center;
    margin: 100px 0 30px;
}

.progress-indicator {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f5f5f7;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007aff;
    transition: width 0.3s ease;
}

.mock-question {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.question-content h3 {
    font-size: 1.25rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.answer-choices {
    margin-bottom: 30px;
}

.answer-choice {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: #f5f5f7;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-choice:hover {
    background: #e8e8ed;
}

.answer-choice.selected {
    background: #e3f2fd;
    border-color: #007aff;
}

.mock-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mock-actions > div {
    display: flex;
    gap: 10px;
}

.mock-results {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.result-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #007aff;
}

.stat-label {
    font-size: 1rem;
    color: #86868b;
    margin-top: 5px;
}

.results-actions {
    margin-top: 30px;
}

/* Review Mode */
.review-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #d2d2d7;
}

.review-item.correct {
    border-left-color: #34c759;
}

.review-item.incorrect {
    border-left-color: #ff3b30;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f7;
}

.review-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1d1d1f;
}

.review-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.review-status.correct {
    background: #e8f5e8;
    color: #34c759;
}

.review-status.incorrect {
    background: #ffeaea;
    color: #ff3b30;
}

.review-question {
    margin-bottom: 20px;
}

.review-question p {
    font-size: 16px;
    line-height: 1.6;
    color: #1d1d1f;
    margin: 0;
}

.review-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.answer-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.answer-section p {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.user-answer {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
}

.user-answer.correct {
    background: #e8f5e8;
    border-color: #34c759;
    color: #1d4e20;
}

.user-answer.incorrect {
    background: #ffeaea;
    border-color: #ff3b30;
    color: #8b1a1a;
}

.correct-answer {
    background: #e8f5e8;
    border: 1px solid #34c759;
    color: #1d4e20;
}

.review-explanation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.review-explanation h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-explanation p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #1d1d1f;
}

@media (max-width: 768px) {
    .review-answers {
        grid-template-columns: 1fr;
    }
    
    .review-item {
        padding: 20px;
    }
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(52, 199, 89, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: #1a1a2e;
    font-weight: 700;
}

.login-header p {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.5;
}

.login-form {
    margin-bottom: 30px;
}

.login-footer {
    text-align: center;
}

.login-footer p {
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 15px;
}

.link {
    color: #007aff;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1d1d1f;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-section a {
    display: block;
    color: #86868b;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #424245;
    color: #86868b;
}

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #1d1d1f;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #34c759;
}

.toast.error {
    background: #ff3b30;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-group {
        flex-direction: column;
        gap: 15px;
    }

    .results-summary {
        flex-direction: column;
        gap: 20px;
    }

    .mock-actions {
        flex-direction: column;
        gap: 15px;
    }

    .questions-table {
        font-size: 14px;
    }

    .questions-table th,
    .questions-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .generation-section,
    .question-section,
    .search-section,
    .mock-question {
        padding: 20px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .about {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature {
        padding: 20px;
    }
}

/* Loading Modal */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    margin: 0 0 10px;
    color: #1d1d1f;
    font-size: 20px;
    font-weight: 600;
}

.loading-content p {
    margin: 0;
    color: #86868b;
    font-size: 14px;
}

/* Model ID display */
.model-id {
    font-size: 12px;
    color: gray;
    margin-top: 4px;
    text-align: left;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* AI Parameter Sliders */
.param-hint {
    font-size: 12px;
    color: #86868b;
    font-weight: 400;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #d2d2d7;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
    min-width: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
}

/* Disabled form state */
.form-disabled {
    pointer-events: none;
    opacity: 0.6;
    user-select: none;
}


/* Custom widths for search form fields */
.search-section .form-row:first-of-type {
    display: flex;
    gap: 15px;
}

.search-section .form-row:first-of-type .form-group:nth-child(1) {
    flex: 0 0 calc(37.5% - 10px);
}

.search-section .form-row:first-of-type .form-group:nth-child(2) {
    flex: 0 0 calc(37.5% - 10px);
}

.search-section .form-row:first-of-type .form-group:nth-child(3) {
    flex: 0 0 calc(25% - 10px);
}

/* Responsive images in Quill editor */
.ql-editor img {
    max-width: 600px;
    height: auto;
    display: block;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.ql-editor img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image modal for full-size view */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #bbb;
}

/* Also apply to view page explanation */
#view-section #explanation img {
    max-width: 800px;
    height: auto;
    display: block;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

#view-section #explanation img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
