/* Onboarding Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-container {
    width: 100%;
    max-width: 600px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Responsive Design for Tabs */
@media (max-width: 480px) {
    .tab-navigation {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-button {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* Login Tab Styles */
.login-tab .step-content {
    text-align: center;
}

.login-tab .form-group {
    margin-bottom: 32px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 16px;
    pointer-events: none;
}

.input-icon + input {
    padding-left: 48px;
}

/* Ensure setup tab is visible by default */
.setup-tab {
    display: block !important;
}

.setup-tab .step-content.active {
    display: block !important;
}

.login-tab {
    display: none !important;
}

/* Course Selection Styles */
.course-selection-container {
    margin-top: 2rem;
}

.loading-courses {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: #667eea;
}

.loading-courses i {
    font-size: 2rem;
}

.loading-courses span {
    font-size: 1.1rem;
    font-weight: 500;
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.course-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-item:hover {
    background: #e3f2fd;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.course-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.course-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.course-item.selected .course-icon {
    background: rgba(255, 255, 255, 0.2);
}

.course-info {
    flex: 1;
}

.course-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.course-details {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    gap: 1rem;
}

.course-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-item.selected .course-details {
    opacity: 0.9;
}

.course-actions {
    display: flex;
    gap: 0.5rem;
}

.access-btn {
    width: 50px;
    height: 60px;
    padding: 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    text-align: center;
    line-height: 1.1;
}

.access-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.course-item.selected .access-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.course-item.selected .access-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.no-courses-message {
    text-align: center;
    padding: 3rem 2rem;
}

.no-courses-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.no-courses-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-courses-message p {
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Override any conflicting styles */
#setup-tab {
    display: block !important;
}

#login-tab {
    display: none !important;
}

/* Force tab visibility when active */
#login-tab.active {
    display: block !important;
}

#setup-tab.active {
    display: block !important;
}

/* Debug: Ensure login tab content is visible when active */
#login-tab.active .step-content {
    display: block !important;
}

#login-tab.active .course-selection-container {
    display: block !important;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: scale(1.1);
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.progress-step span {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Main Card */
.onboarding-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.onboarding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

/* Step Content */
.step-content {
    display: none;
    text-align: center;
}

.step-content.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

/* Step Icon */
.step-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.step-icon i {
    font-size: 32px;
    color: white;
}

/* Completion Icon */
.completion-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 20px rgba(86, 171, 47, 0.3);
}

.completion-icon i {
    font-size: 48px;
    color: white;
}

/* Typography */
h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.step-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 40px;
    line-height: 1.5;
}

.step-subtitle span {
    color: #4facfe;
    font-weight: 600;
}

.completion-message {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Form Styles */
.onboarding-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bdc3c7;
}

/* Select Dropdown */
.form-group select {
    appearance: none;
    background-image: none;
    cursor: pointer;
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
    font-size: 12px;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.continue-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.continue-btn:active {
    transform: translateY(0);
}

.back-btn {
    padding: 12px 24px;
    background: transparent;
    color: #7f8c8d;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.back-btn:hover {
    border-color: #4facfe;
    color: #4facfe;
}

/* Form Buttons Container */
.form-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
}

/* Completion Actions */
.completion-actions {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .onboarding-container {
        padding: 0 10px;
    }
    
    .onboarding-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .progress-indicator {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .progress-step span {
        font-size: 10px;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .step-icon i {
        font-size: 24px;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .back-btn {
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .onboarding-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .progress-indicator {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    .step-circle {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .step-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .continue-btn {
    position: relative;
    color: transparent;
}

.loading .continue-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
