/* ============================================
   Ticket Course - Apple-Style Modern UI
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #007AFF;
    --primary-hover: #0056CC;
    --success-color: #34C759;
    --success-hover: #2DA44E;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --discord-color: #5865F2;
    --discord-hover: #4752C4;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --bg-tertiary: #E8E8ED;
    --bg-dark: #1D1D1F;

    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #86868B;
    --text-inverse: #FFFFFF;

    --border-color: #D2D2D7;
    --border-light: #E8E8ED;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.progress-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-mini-bar {
    width: 100px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.progress-mini-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.logout-btn {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    flex: 1;
    width: 100%;
}

/* ============================================
   Flash Messages
   ============================================ */

.flash-messages {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 24px;
}

.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

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

.flash-success {
    background: #D1FAE5;
    color: #065F46;
}

.flash-error {
    background: #FEE2E2;
    color: #991B1B;
}

.flash-warning {
    background: #FEF3C7;
    color: #92400E;
}

.flash-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.flash-close:hover {
    opacity: 1;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-next-complete.completed {
    background: var(--success-color);
}

.btn-next-complete.completed:hover {
    background: #059669;
}

.btn-next-complete .btn-icon {
    margin-right: 4px;
}

.btn-next-complete.btn-finish {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-next-complete.btn-finish:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-next-complete.btn-finish.completed {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}

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

.btn-success:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-celebration {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(52, 199, 89, 0);
    }
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease;
}

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

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

.login-logo {
    margin-bottom: 16px;
}

.logo-emoji {
    font-size: 4rem;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.features-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

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

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: var(--discord-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.discord-login-btn:hover {
    background: var(--discord-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.discord-icon {
    width: 24px;
    height: 24px;
}

.login-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 20px;
}

/* Dev Mode Styles */
.dev-mode-section {
    margin-top: 24px;
}

.dev-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.dev-divider::before,
.dev-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.dev-divider span {
    padding: 0 16px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.dev-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dev-login-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dev-icon {
    font-size: 1.2rem;
}

.dev-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--warning-color);
    margin-top: 12px;
    font-style: italic;
}

.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background: var(--success-color);
    bottom: -50px;
    left: -50px;
}

.bg-shape-3 {
    width: 200px;
    height: 200px;
    background: var(--discord-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   Access Denied Page
   ============================================ */

.access-denied-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.access-denied-card {
    text-align: center;
    background: var(--bg-primary);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.denied-icon span {
    font-size: 4rem;
}

.access-denied-card h1 {
    margin: 16px 0;
    font-size: 1.5rem;
}

.denied-message {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.denied-submessage {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ============================================
   Dashboard Page
   ============================================ */

.dashboard-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.dashboard-header {
    margin-bottom: 48px;
}

.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.admin-link:hover {
    background: var(--text-primary);
    color: white;
    transform: translateY(-1px);
}

.overall-progress-card {
    background: var(--bg-primary);
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.progress-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar-large {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.completion-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.chapter-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.chapter-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.chapter-card.completed {
    border: 2px solid var(--success-color);
}

.chapter-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.chapter-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.chapter-progress {
    margin-bottom: 20px;
}

.progress-bar-small {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.chapter-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

.chapter-link .arrow {
    transition: transform var(--transition-fast);
}

.chapter-card:hover .chapter-link .arrow {
    transform: translateX(4px);
}

.completed-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.quick-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dashboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.btn-danger-outline {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

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

.stat-card {
    flex: 1;
    min-width: 150px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 1.8rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   Chapter Page
   ============================================ */

.chapter-page {
    display: flex;
    min-height: calc(100vh - 56px);
}

.chapter-sidebar {
    width: 300px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-color);
}

.back-arrow {
    font-size: 1.1rem;
}

.nav-chapter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-list {
    list-style: none;
}

.page-item {
    margin-bottom: 4px;
}

.page-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-item a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.page-item.active a {
    background: var(--primary-color);
    color: white;
}

.page-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-number {
    background: var(--bg-tertiary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-complete {
    background: var(--success-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-item.active .status-number {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.page-title {
    font-size: 0.9rem;
    flex: 1;
}

.sidebar-progress {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.chapter-main {
    flex: 1;
    padding: 40px;
    min-width: 0;
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.breadcrumb .separator {
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.page-indicator {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.page-content {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    flex: 1;
}

.page-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.page-content ul, .page-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Page Content Wrapper with Feature Image */
.page-content-wrapper {
    display: block;
}

/* Top position - image above content */
.page-content-wrapper.has-feature-image.image-top {
    display: block;
}

.page-feature-image-top {
    margin-bottom: 32px;
    text-align: center;
}

.page-feature-image-top .feature-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: contain;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.page-feature-image-top .feature-img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-lg);
}

/* Side position - image beside content */
.page-content-wrapper.has-feature-image.image-side {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.page-content-wrapper.has-feature-image.image-side .page-content {
    margin-bottom: 0;
    min-width: 0;
    flex: 1;
}

.page-feature-image {
    position: sticky;
    top: 100px;
    flex-shrink: 1;
    min-width: 200px;
}

.page-feature-image .feature-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: contain;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.page-feature-image .feature-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Responsive feature image */
@media (max-width: 1200px) {
    .page-content-wrapper.has-feature-image.image-side {
        gap: 24px;
    }
    
    .page-feature-image {
        flex-shrink: 1;
    }
}

@media (max-width: 900px) {
    .page-feature-image {
        min-width: 150px;
    }
}

@media (max-width: 800px) {
    .page-content-wrapper.has-feature-image.image-side {
        flex-direction: column;
    }
    
    .page-feature-image {
        position: relative;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset;
        order: -1;
    }
    
    .page-feature-image .feature-img {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
}

/* Content Cards */
.info-card, .highlight-box, .tip-box, .warning-box, .strategy-box {
    padding: 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.info-card {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
}

.info-card h3, .highlight-box h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.highlight-box {
    background: linear-gradient(135deg, #E3F2FD, #F3E5F5);
}

.tip-box {
    background: #E8F5E9;
    border-left: 4px solid var(--success-color);
}

.warning-box {
    background: #FFF3E0;
    border-left: 4px solid var(--warning-color);
}

.strategy-box {
    background: var(--bg-secondary);
}

/* Checklist */
.checklist {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.checklist h3 {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.checklist > div:not(.check-item),
.checklist > p:not(.check-item) {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.check-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    margin: 0 -12px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.check-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.check-item:last-of-type {
    border-bottom: none;
}

.check-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    background: var(--bg-primary);
    color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.check-item.checked .check-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.check-item.checked .check-text,
.check-item.checked > span:not(.check-icon),
.check-item.checked > a {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.check-text {
    flex: 1;
    transition: all var(--transition-fast);
}

.check-item a {
    color: var(--primary-color);
}

.check-item.checked a {
    color: var(--text-tertiary);
}

/* Grids */
.segment-grid, .platform-grid, .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.segment, .platform-card, .tip-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.segment strong, .platform-card h4, .tip-card h4 {
    display: block;
    margin-bottom: 8px;
}

.tip-card .tip-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    margin-top: 8px;
}

/* Steps */
.action-steps, .setup-steps {
    margin: 24px 0;
}

.step, .setup-step {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.step:last-child, .setup-step:last-child {
    border-bottom: none;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Tables */
.comparison-table {
    overflow-x: auto;
    margin: 24px 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comparison-table th, .comparison-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Alert Example */
.alert-example {
    margin: 24px 0;
}

.example-alert {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.alert-header {
    background: var(--danger-color);
    color: white;
    padding: 10px 16px;
    font-weight: 600;
}

.alert-body {
    padding: 16px;
    line-height: 1.8;
}

/* Features */
.feature-highlight {
    margin: 24px 0;
}

.feature {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.feature:last-child {
    border-bottom: none;
}

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

/* Advanced Features */
.advanced-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.advanced-card {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.advanced-card h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

/* Best Practices */
.best-practices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.practice-card {
    padding: 24px;
    border-radius: var(--radius-md);
}

.practice-card.green {
    background: #E8F5E9;
    border: 2px solid var(--success-color);
}

.practice-card.red {
    background: #FFEBEE;
    border: 2px solid var(--danger-color);
}

.practice-card h4 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.practice-card ul {
    padding-left: 20px;
}

.final-tip {
    background: linear-gradient(135deg, #E3F2FD, #E8F5E9);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-top: 24px;
}

.final-tip h3 {
    margin-bottom: 12px;
}

/* Video Embeds */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-dark);
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: -16px;
    margin-bottom: 24px;
    font-style: italic;
}

/* Pricing */
.pricing-tips {
    margin: 24px 0;
}

.principle {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.principle:last-child {
    border-bottom: none;
}

.principle strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 4px;
}

/* Feature List */
.feature-list .feature-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

/* Page Footer */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    margin-top: 24px;
}

.completion-section {
    flex-shrink: 0;
}

.completed-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success-color);
    font-weight: 500;
}

.completed-icon {
    width: 28px;
    height: 28px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navigation-buttons {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.navigation-buttons .btn {
    white-space: nowrap;
    min-width: fit-content;
}

.nav-arrow {
    font-size: 1.1rem;
}

/* ============================================
   Completion Page
   ============================================ */

.completion-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.completion-container {
    position: relative;
    z-index: 1;
}

.completion-card {
    background: var(--bg-primary);
    padding: 60px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    text-align: center;
    animation: scaleIn 0.6s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.trophy-icon {
    margin-bottom: 24px;
}

.trophy {
    font-size: 5rem;
    display: block;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.completion-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.completion-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.completion-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

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

.detail-text {
    text-align: left;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.detail-value {
    font-weight: 600;
}

.certificate-box {
    margin-bottom: 32px;
}

.certificate-border {
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--success-color)) 1;
    padding: 4px;
}

.certificate-content {
    background: linear-gradient(135deg, #FAFAFA, #F5F5F7);
    padding: 32px;
}

.certificate-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

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

.certificate-header h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-tertiary);
}

.cert-text {
    color: var(--text-secondary);
    margin: 8px 0;
}

.cert-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0;
}

.cert-course {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 12px;
}

.cert-footer {
    margin-top: 20px;
}

.cert-badge {
    font-size: 2rem;
}

.role-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: #D1FAE5;
    border-radius: var(--radius-md);
    color: #065F46;
    margin-bottom: 24px;
}

.role-success .success-icon {
    width: 24px;
    height: 24px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-pending {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.role-pending p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.completion-actions {
    margin-top: 16px;
}

.completion-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: var(--success-color);
    top: -200px;
    right: -200px;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    bottom: -150px;
    left: -150px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 20px 24px;
    text-align: center;
}

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
    .chapter-page {
        flex-direction: column;
    }

    .chapter-sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .chapter-main {
        padding: 20px;
    }

    .page-content {
        padding: 24px;
    }
    
    .page-content-wrapper.has-feature-image.image-side {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .progress-mini {
        display: none;
    }

    .dashboard-page {
        padding: 24px 16px;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .chapters-grid {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        flex-direction: column;
    }

    .login-card {
        padding: 32px 24px;
    }

    .completion-card {
        padding: 40px 24px;
    }

    .completion-title {
        font-size: 1.8rem;
    }

    .completion-details {
        flex-direction: column;
        gap: 20px;
    }

    .page-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .navigation-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .navigation-buttons .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .user-name {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
