/* Reset and Base Styles */
* {
    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: #333;
    background-color: #f8f9fa;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.header-nav {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.logo-container {
    margin: 1rem 0;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 56px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-option {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin: 8px;
    cursor: pointer;
    user-select: none;
}

.btn-option:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-option input[type="radio"]:checked + span {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    transform: scale(1.05);
}

/* Radio button label styling */
.btn-option input[type="radio"] {
    display: none;
}

.btn-option input[type="radio"]:checked + span {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    transform: scale(1.05);
}

.btn-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color, #007bff);
    border: 2px solid var(--primary-color, #007bff);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-color, #007bff);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Navigation Section Styles */
.nav-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Question Styles */
.question-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Ranking Styles */
.ranking-container {
    text-align: center;
}

.ranking-instruction {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #495057;
}

.ranking-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ranking-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-option:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.ranking-option.selected {
    border-color: #28a745;
    background: #d4edda;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    margin-right: 1rem;
    min-width: 2rem;
    text-align: center;
}

.option-text {
    font-size: 1.1rem;
    flex: 1;
}

/* Results Styles */
.results-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.results-list {
    margin-bottom: 2rem;
}

.result-item {
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

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

.result-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    flex: 1;
}

.result-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    background: #d4edda;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.score-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
    border-radius: 6px;
    transition: width 0.8s ease;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
}

.secondary-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

/* Settings Styles */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setting-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.setting-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.setting-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.lens-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.lens-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lens-option:hover {
    background: #e9ecef;
}

.lens-name {
    font-size: 0.9rem;
}

.current-logo {
    margin-top: 1rem;
    text-align: center;
}

.logo-preview {
    max-width: 200px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Info Styles */
.info-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.info-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.process-list {
    padding-left: 2rem;
}

.process-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.lens-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lens-type {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

.notes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note {
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid;
}

.note.warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.note.info {
    background: #d1ecf1;
    border-color: #17a2b8;
}

.note.success {
    background: #d4edda;
    border-color: #28a745;
}

.tech-info p {
    margin-bottom: 0.5rem;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Navigation */
.navigation-buttons {
    text-align: center;
    margin-top: 2rem;
}

/* Surgeon and Practice Info */
.surgeon-info {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.surgeon-info h3 {
    color: #2c3e50;
    font-size: 1.3rem;
}

.practice-logo {
    text-align: center;
    margin: 2rem 0;
}

.logo-img {
    max-width: 200px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .question-container,
    .setting-section,
    .info-section {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .secondary-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .lens-options {
        grid-template-columns: 1fr;
    }
    
    .category-grid,
    .lens-types {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .question-text {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 48px;
    }
}

/* Medical Disclaimer */
.medical-disclaimer {
    margin-top: 3rem;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.medical-disclaimer p {
    margin: 0;
    font-size: 0.75rem;
    font-style: italic;
    color: #6c757d;
    line-height: 1.4;
}

/* Survey Header Styles */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.home-icon {
    font-size: 1.5rem;
    text-decoration: none;
    color: #495057;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.home-icon:hover {
    color: var(--primary-color, #007bff);
    transform: scale(1.1);
}

.header .title {
    margin: 0;
    text-align: center;
    flex: 1;
}

/* Progress Bar */
.progress-bar {
    position: relative;
    background: #e9ecef;
    height: 16px;
    margin: 0 2rem 1rem 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #007bff), #28a745);
    border-radius: 8px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Responsive adjustments for survey header */
@media (max-width: 768px) {
    .header-top {
        padding: 0.75rem 1rem;
    }
    
    .progress-bar {
        margin: 0 1rem 1rem 1rem;
    }
    
    .home-icon {
        font-size: 1.25rem;
        padding: 0.4rem;
    }
    
    .header .title {
        font-size: 1.25rem;
    }
}
