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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

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

/* Header */
.header {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    width: 200px;
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-weight: 600;
    color: #4facfe;
}

/* Phase Navigation */
.phase-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.phase-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.phase-dot.active {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    transform: scale(1.1);
}

.phase-dot.completed {
    background: #10b981;
    border-color: #10b981;
}

/* Content Cards */
.content-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    color: #1a1a2e;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: none;
}

.content-card.active {
    display: block;
    animation: slideIn 0.5s ease;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.card-icon.intro { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-icon.video { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-icon.practice { background: linear-gradient(135deg, #f093fb, #f5576c); }

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.card-subtitle {
    color: #666;
    font-size: 0.9rem;
}

/* Standards Box */
.standards-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 5px solid #4facfe;
}

.standards-box h4 {
    color: #4facfe;
    margin-bottom: 10px;
}

.standards-box ul {
    list-style: none;
    padding-left: 0;
}

.standards-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.standards-box li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Learning Objectives */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.objective-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.objective-number {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Main Theorem Box */
.theorem-box.main-theorem {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 30px 0;
}

.formula-big {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Video Section */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.video-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
}

.video-box h4 {
    color: #1a1a2e;
    margin-bottom: 10px;
    font-size: 1rem;
}

.video-box.find-hyp {
    border-top: 5px solid #4facfe;
}

.video-box.find-hyp h4 {
    color: #4facfe;
}

.video-box.find-leg {
    border-top: 5px solid #f5576c;
}

.video-box.find-leg h4 {
    color: #f5576c;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

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

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

.key-takeaways {
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    border-radius: 15px;
    padding: 25px;
}

.key-takeaways h4 {
    color: #00796b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.takeaway-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #00796b;
}

.takeaway-item:last-child {
    margin-bottom: 0;
}

/* Theorem Box */
.theorem-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.theorem-box h3 {
    color: #4facfe;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.theorem-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.theorem-text .highlight {
    color: #00f2fe;
    font-weight: 700;
}

.theorem-text .formula {
    font-size: 1.6rem;
    color: #f5576c;
    font-weight: 700;
    display: block;
    margin: 15px 0;
}

/* Two Column Layout */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.column-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.column-box.find-hyp {
    border-top: 5px solid #4facfe;
}

.column-box.find-leg {
    border-top: 5px solid #f5576c;
}

.column-box h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.column-box .formula-display {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

/* Triangle Diagram */
.triangle-diagram {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.triangle-svg {
    max-width: 300px;
}

/* Key Points */
.key-points {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.key-points h4 {
    color: #e65100;
    margin-bottom: 15px;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
}

.point-item:last-child {
    margin-bottom: 0;
}

.point-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Exercise Section */
.exercise-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
}

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

.exercise-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.exercise-badge.guided {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.exercise-badge.independent {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.problem-box {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    border: 3px solid #e9ecef;
    margin-bottom: 20px;
    text-align: center;
}

.problem-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 15px;
}

.triangle-problem {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.problem-triangle {
    max-width: 250px;
}

/* Step-by-Step Guide */
.steps-container {
    margin-top: 25px;
}

.step {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #e9ecef;
    display: none;
}

.step.visible {
    display: block;
    animation: slideIn 0.3s ease;
}

.step.active {
    border-left-color: #4facfe;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.2);
}

.step.completed {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #666;
}

.step.active .step-number {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
}

.step.completed .step-number {
    background: #10b981;
    color: #fff;
}

.step-title {
    font-weight: 600;
    color: #1a1a2e;
}

.step-content {
    padding-left: 50px;
}

.step-explanation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.step-explanation .math {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #764ba2;
}

.calculation-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 1.2rem;
}

.calculation-row .math {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.calculation-row .result {
    color: #10b981;
    font-weight: 700;
}

.calculation-row .fail {
    color: #ef4444;
    font-weight: 700;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.input-group label {
    font-weight: 600;
    color: #1a1a2e;
}

.input-group input, .input-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    width: 100px;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #4facfe;
}

.check-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.check-btn:hover {
    transform: scale(1.05);
}

.check-btn.small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.result-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: none;
}

.result-badge.correct {
    background: #d1fae5;
    color: #059669;
    display: inline-block;
}

.result-badge.incorrect {
    background: #fee2e2;
    color: #dc2626;
    display: inline-block;
}

/* Feedback Message */
.feedback {
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    display: none;
    text-align: center;
}

.feedback.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.feedback.correct {
    background: #d1fae5;
    color: #059669;
    border: 2px solid #10b981;
}

.feedback.incorrect {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #ef4444;
}

.feedback-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-btn {
    padding: 15px 35px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn.prev {
    background: #e9ecef;
    color: #1a1a2e;
}

.nav-btn.next {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
}

.nav-btn:hover {
    transform: scale(1.05);
}

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

/* Independent Practice */
.quick-check {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.quick-question {
    flex: 1;
    min-width: 200px;
}

.quick-question .problem-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.quick-question .sub-question {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.quick-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quick-input input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    width: 120px;
    font-family: 'Poppins', sans-serif;
}

.quick-input input:focus {
    outline: none;
    border-color: #4facfe;
}

.quick-input input:disabled {
    background: #f8f9fa;
}

.quick-result {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

/* Score Display */
.score-display {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.score-display h3 {
    color: #4facfe;
    margin-bottom: 15px;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-text {
    color: #aaa;
    margin-top: 10px;
}

/* Completion Screen */
.completion-screen {
    text-align: center;
    padding: 50px;
}

.completion-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.completion-title {
    font-size: 2rem;
    color: #10b981;
    margin-bottom: 15px;
}

.completion-message {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.restart-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s ease;
}

.restart-btn:hover {
    transform: scale(1.05);
}

/* Print Button */
.print-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s ease;
    margin-right: 15px;
}

.print-btn:hover {
    transform: scale(1.05);
}

/* Printable Summary */
.print-summary {
    display: none;
}

@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .header, .phase-nav, .content-card, .nav-buttons {
        display: none !important;
    }

    .print-summary {
        display: block !important;
        padding: 20px;
        font-family: 'Poppins', Arial, sans-serif;
    }

    .print-summary h1 {
        color: #1a1a2e;
        text-align: center;
        margin-bottom: 10px;
        font-size: 22px;
    }

    .print-summary .student-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #1a1a2e;
    }

    .print-summary .student-info span {
        font-size: 14px;
    }

    .print-summary .student-info .line {
        display: inline-block;
        width: 200px;
        border-bottom: 1px solid #000;
        margin-left: 10px;
    }

    .print-summary .standards-print {
        background: #f0f0f0 !important;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .print-summary .standards-print h3 {
        margin-bottom: 10px;
        color: #4facfe;
    }

    .print-summary .results-section {
        margin-bottom: 25px;
    }

    .print-summary .results-section h3 {
        color: #1a1a2e;
        border-bottom: 2px solid #4facfe;
        padding-bottom: 5px;
        margin-bottom: 15px;
    }

    .print-summary .result-item {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        margin-bottom: 8px;
        background: #f8f9fa !important;
        border-radius: 8px;
        border-left: 4px solid #e9ecef;
    }

    .print-summary .result-item.correct {
        border-left-color: #10b981 !important;
        background: #d1fae5 !important;
    }

    .print-summary .result-item.incorrect {
        border-left-color: #ef4444 !important;
        background: #fee2e2 !important;
    }

    .print-summary .final-score-print {
        text-align: center;
        padding: 20px;
        background: linear-gradient(135deg, #4facfe, #00f2fe) !important;
        color: #fff !important;
        border-radius: 15px;
        margin-top: 20px;
    }

    .print-summary .final-score-print h2 {
        margin-bottom: 10px;
    }

    .print-summary .final-score-print .big-score {
        font-size: 48px;
        font-weight: 700;
    }

    .print-summary .final-score-print .percentage {
        font-size: 24px;
        margin-top: 5px;
    }

    .print-summary .formula-reminder {
        margin-top: 25px;
        padding: 15px;
        border: 2px solid #1a1a2e;
        border-radius: 10px;
    }

    .print-summary .formula-reminder h3 {
        text-align: center;
        margin-bottom: 10px;
    }

    .print-summary .formula-reminder p {
        line-height: 1.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.2rem;
    }

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

    .formula-big {
        font-size: 2rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .nav-btn {
        justify-content: center;
    }

    .quick-check {
        flex-direction: column;
        text-align: center;
    }

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

    .input-group {
        flex-direction: column;
    }
}
