/* Advanced Eye Testing Platform - Styles */

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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-test {
    background: var(--primary);
    color: var(--white);
    width: 100%;
    margin-top: 1rem;
}

.btn-test:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Tests Section */
.tests-section {
    padding: 4rem 0;
    background: var(--white);
    min-height: 60vh;
    display: block;
    visibility: visible;
}

.tests-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    visibility: visible;
    opacity: 1;
}

.test-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-align: center;
    display: block;
    visibility: visible;
    opacity: 1;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.test-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.test-card h3 {
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.test-card p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.test-details {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    overflow-y: auto;
}

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

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 2rem auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem auto;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    transform: scale(1.1);
}

/* Test Interface */
.test-interface {
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.test-interface * {
    box-sizing: border-box;
}

.test-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.test-instructions {
    background: #e0e7ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: var(--dark);
}

.test-display {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .test-display {
        padding: 1rem;
        min-height: 300px;
    }
}

.test-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.test-controls button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-correct {
    background: var(--success);
    color: var(--white);
}

.btn-incorrect {
    background: var(--danger);
    color: var(--white);
}

.btn-next {
    background: var(--primary);
    color: var(--white);
}

/* Snellen Chart */
.snellen-chart {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
}

.snellen-line {
    margin: 1rem 0;
    letter-spacing: 0.2em;
}

.snellen-line.large {
    font-size: 4rem;
}

.snellen-line.medium {
    font-size: 2.5rem;
}

.snellen-line.small {
    font-size: 1.5rem;
}

.snellen-line.smaller {
    font-size: 1rem;
}

.snellen-line.smallest {
    font-size: 0.75rem;
}

/* Ishihara Plates */
.ishihara-plate {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Astigmatism Test */
.astigmatism-circle {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    margin: 2rem auto;
    background: radial-gradient(circle, #000 0%, #000 30%, #fff 30%, #fff 100%);
    position: relative;
}

.astigmatism-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.astigmatism-line {
    position: absolute;
    width: 2px;
    height: 200px;
    background: #000;
    top: 0;
    left: 50%;
    transform-origin: bottom center;
}

/* Results Section */
.results-section {
    padding: 4rem 0;
    background: var(--white);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.result-card {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    color: var(--dark);
}

.result-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.result-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1rem 0;
}

.result-details {
    color: var(--gray);
    line-height: 1.8;
}

/* History Section */
.history-section {
    min-height: 400px;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    background: var(--light);
}

#history-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#history-chart {
    position: relative;
    width: 100% !important;
    height: 300px !important;
    max-height: 300px;
    max-height: 400px;
    margin-top: 2rem;
}

/* Shop Section */
.shop-section {
    padding: 4rem 0;
    background: var(--white);
}

.shop-filters {
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.search-bar {
    margin-bottom: 1rem;
}

.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: var(--success);
    color: var(--white);
}

.stock-badge.out-of-stock {
    background: var(--danger);
    color: var(--white);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-retailer {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    flex: 1;
}

.product-options {
    margin-bottom: 0.75rem;
}

.product-options label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.product-options select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 0.9rem;
}

.product-price {
    margin: 1rem 0;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.price-vat {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
    margin-top: 0.25rem;
}

.btn-add-cart {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-add-cart:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-cart:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: var(--dark);
}

.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    color: var(--gray);
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.cart-item-info p {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0.25rem 0;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: var(--light);
}

.cart-summary {
    margin-bottom: 1rem;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    border-top: 2px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    color: var(--primary);
}

/* Cart Button */
.cart-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cart-button span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Checkout Form */
.checkout-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 8px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.checkout-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--success);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Specialists Section */
.specialists-section {
    padding: 4rem 0;
    background: var(--white);
}

.location-controls {
    margin-bottom: 2rem;
}

.location-status {
    background: #e0e7ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.location-status > div {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-status #location-text {
    font-weight: 500;
    color: var(--dark);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-controls label {
    font-weight: 500;
    color: var(--dark);
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.specialist-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.specialist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.specialist-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.specialist-header h3 {
    color: var(--dark);
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
}

.specialist-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.specialist-type.optometrist {
    background: #dbeafe;
    color: #1e40af;
}

.specialist-type.ophthalmologist {
    background: #fce7f3;
    color: #9f1239;
}

.specialist-type.optician {
    background: #f0fdf4;
    color: #166534;
}

.specialist-info {
    margin-bottom: 1rem;
}

.specialist-address,
.specialist-distance {
    margin: 0.5rem 0;
    color: var(--gray);
    font-size: 0.95rem;
}

.specialist-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

.rating-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.specialist-hours {
    margin: 0.5rem 0;
    font-weight: 500;
}

.specialist-hours.open {
    color: var(--success);
}

.specialist-hours.closed {
    color: var(--danger);
}

.specialist-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.specialist-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: #4b5563;
}

.specialist-details {
    margin-top: 1rem;
    line-height: 1.8;
}

.specialist-details p {
    margin: 0.75rem 0;
}

.specialist-details a {
    color: var(--primary);
    text-decoration: none;
}

.specialist-details a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* Result Modals */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.result-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.result-modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-modal-header h2 {
    margin: 0;
    color: var(--dark);
    font-size: 1.5rem;
}

.result-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.result-modal-close:hover {
    background: #f3f4f6;
    color: var(--dark);
}

.result-modal-body {
    padding: 1.5rem;
}

.result-test-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.result-score-large {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 1rem 0;
}

.result-detail-item {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.result-note {
    padding: 0.75rem;
    margin: 1rem 0;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid var(--warning);
    color: #92400e;
}

.result-progress {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    border-radius: 4px;
}

.result-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Overall Results Modal */
.overall-results-modal .result-modal-content {
    max-width: 800px;
}

.overall-content {
    padding: 0;
}

.overall-summary {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: 16px 16px 0 0;
    margin-bottom: 1.5rem;
}

.overall-score {
    flex: 1;
    text-align: center;
}

.overall-score-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.overall-score-value {
    font-size: 3.5rem;
    font-weight: 700;
}

.overall-stats {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    align-items: center;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.overall-results-list {
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.overall-results-list h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.overall-result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    gap: 1rem;
}

.overall-result-name {
    flex: 1;
    font-weight: 600;
    color: var(--dark);
}

.overall-result-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 60px;
    text-align: right;
}

.overall-result-detail {
    flex: 1;
    color: var(--gray);
    font-size: 0.9rem;
}

.overall-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .overall-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .overall-stats {
        justify-content: space-around;
    }
    
    .overall-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .overall-result-score {
        text-align: left;
    }
}

y/* Email Notification Animation */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}


/* Result Modals */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.result-modal.active {
    display: flex;
}

.result-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-modal-close:hover {
    color: #000;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
