/**
 * Phase 2: Understanding - Styles
 * 6 Principles of Aligned Manifestation™
 */

:root {
    --purple: #8B5CF6;
    --gold: #F59E0B;
    --blue: #3B82F6;
    --green: #10B981;
    --dark-bg: #0F0F23;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
}

/* Phase Header Section */
.phase-header-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
    border: 2px solid var(--purple);
    border-radius: 25px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.phase-badge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.phase-badge {
    background: var(--purple);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unlock-badge {
    background: var(--green);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
}

.phase-header-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.phase-header-section h2 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    font-weight: 600;
}

.phase-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.phase-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

/* Progress Bar Large */
.progress-section {
    margin-top: 2rem;
}

.progress-bar-large {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Principles Overview Section */
.principles-overview-section {
    margin: 4rem 0;
    text-align: center;
}

.principles-overview-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Timeline */
.principles-roadmap {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.principle-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.timeline-item.completed {
    border-color: var(--green);
    background: rgba(16, 185, 129, 0.1);
}

.timeline-item:hover {
    transform: translateY(-5px);
    border-color: var(--purple);
}

.timeline-icon {
    font-size: 2.5rem;
}

.timeline-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.timeline-weeks {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-connector {
    font-size: 2rem;
    color: var(--text-muted);
    display: none;
}

@media (min-width: 1200px) {
    .timeline-connector {
        display: block;
    }
    .principle-timeline {
        flex-wrap: nowrap;
    }
}

/* Principle Cards */
.principle-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.principle-card.completed {
    border-left: 5px solid var(--green);
}

.principle-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
}

.principle-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding: 2rem;
    cursor: pointer;
    align-items: center;
}

.principle-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.principle-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    padding: 1rem;
    border-radius: 15px;
}

.principle-number {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.principle-title-group {
    text-align: left;
}

.principle-title-group h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.principle-subtitle {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.principle-duration {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.principle-status {
    text-align: right;
}

.status-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple);
    border: 2px solid var(--purple);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--green);
    border-color: var(--green);
}

/* Principle Content */
.principle-content {
    padding: 0 2rem 2rem;
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.principle-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

.principle-overview,
.daily-practices,
.workbook-section,
.key-exercises,
.reflection-questions {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.principle-overview h4,
.daily-practices h4,
.workbook-section h4,
.key-exercises h4,
.reflection-questions h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.principle-overview ul,
.key-exercises ol {
    padding-left: 1.5rem;
}

.principle-overview li,
.key-exercises li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Practice Checklist */
.practice-checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.practice-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.practice-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.practice-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--purple);
}

.practice-item label {
    flex: 1;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

/* Workbook Card */
.workbook-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 2px solid var(--purple);
    border-radius: 15px;
}

.workbook-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.workbook-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.download-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Reflection Questions */
.week-questions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--purple);
    border-radius: 10px;
}

.week-questions h5 {
    color: var(--purple);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.week-questions ol {
    padding-left: 1.5rem;
}

.week-questions li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Principle Actions */
.principle-actions {
    text-align: center;
    margin-top: 2rem;
}

.complete-button {
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--green), #059669);
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.complete-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.completed-badge {
    padding: 1.25rem 3rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--green);
    border: 3px solid var(--green);
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: default;
}

/* Expand Button */
.expand-button {
    width: 100%;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0 0 18px 18px;
    color: var(--purple);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: -1px;
}

.expand-button:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Next Phase Section */
.next-phase-section {
    margin-top: 5rem;
    padding: 3rem 2rem;
    text-align: center;
}

.next-phase-card {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 3px dashed var(--glass-border);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.next-phase-card.locked h3 {
    color: var(--text-muted);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.next-phase-card.unlocked {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border: 3px solid var(--green);
}

.next-phase-card.unlocked h3 {
    color: var(--green);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.unlock-progress {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--purple);
}

.cta-button {
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--green), var(--blue));
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

/* Locked Message */
.locked-message {
    text-align: center;
    padding: 5rem 2rem;
}

.lock-icon-large {
    font-size: 5rem;
    margin-bottom: 2rem;
}

.locked-message h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.locked-message p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary-large {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: var(--purple);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primary-large:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.toast-success {
    border-left: 4px solid var(--green);
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid var(--blue);
}

/* Completion Modal */
.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    border: 3px solid var(--gold);
    border-radius: 25px;
    padding: 3rem;
    max-width: 600px;
    text-align: center;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.modal-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.badge-award {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid var(--gold);
    border-radius: 20px;
}

.badge-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.badge-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-actions button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--purple);
    color: white;
}

.btn-success {
    background: var(--green);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .phase-header-section h1 {
        font-size: 2rem;
    }

    .phase-header-section h2 {
        font-size: 1.2rem;
    }

    .phase-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .principle-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .principle-title-group {
        text-align: center;
    }

    .principle-status {
        text-align: center;
    }

    .workbook-card {
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }

    .timeline-connector {
        display: none;
    }

    .principle-timeline {
        flex-direction: column;
    }
}
