:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --success-color: #2a9d8f;
    --warning-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --theory-bg: #e7f1ff;
    --practice-bg: #f0f9ff;
    --archive-bg: #fff5f5;
    --correct-color: #2a9d8f;
    --incorrect-color: #f72585;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::after {
    content: '01001001 01101110 01100110 01101111';
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    font-family: monospace;
    font-size: 14px;
    opacity: 0.3;
    letter-spacing: 2px;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.progress-container {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-color), var(--success-color));
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 80px;
    text-align: center;
}

.content {
    display: flex;
    min-height: 600px;
}

.steps-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 20px;
    overflow-y: auto;
}

.step-item {
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.step-item.active {
    background: var(--theory-bg);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.step-item.completed {
    background: #e8f4f3;
    border-left-color: var(--success-color);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.step-item.completed .step-number {
    background: var(--success-color);
}

.step-item.active .step-number {
    background: var(--secondary-color);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

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

.section-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-subtitle {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin: 25px 0 15px;
}

.theory-box, .practice-box {
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.theory-box {
    background: var(--theory-bg);
    border-left: 5px solid var(--primary-color);
}

.practice-box {
    background: var(--practice-bg);
    border-left: 5px solid var(--accent-color);
}

.archive-box {
    background: var(--archive-bg);
    border-left: 5px solid var(--warning-color);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card p {
    color: #666;
    font-size: 0.95rem;
}

.formula {
    font-family: 'Cambria Math', serif;
    font-size: 1.2rem;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px dashed #ccc;
    text-align: center;
}

.calculator {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin: 20px 0;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.btn-success:hover {
    background: #21867a;
}

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

.btn-warning:hover {
    background: #d41c6a;
}

.btn-check {
    background: var(--accent-color);
}

.btn-check:hover {
    background: #2ba3d3;
}

.btn-disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
    display: none;
}

.result-box.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.result-title {
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.comparison-table th, .comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

.archive-simulator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.file-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item.selected {
    background: var(--theory-bg);
    border-left: 3px solid var(--primary-color);
}

.file-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 10px;
}

.file-size {
    font-family: monospace;
    background: #f1f3f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.archive-result {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.compression-ratio {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
    text-align: center;
    margin: 20px 0;
}

.compression-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.compression-fill {
    height: 100%;
    background: linear-gradient(to right, var(--warning-color), var(--accent-color));
    width: 0%;
    transition: width 1s ease;
}

.task {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #eee;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.task-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.task-checkbox input {
    margin-top: 3px;
}

.task-checkbox label {
    cursor: pointer;
}

.user-answer {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--accent-color);
}

.correct-answer {
    background: #e8f4f3;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--success-color);
}

.answer-comparison {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #eee;
}

.answer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
}

.answer-item.correct {
    background: #e8f4f3;
    border-left: 4px solid var(--success-color);
}

.answer-item.incorrect {
    background: #fff5f5;
    border-left: 4px solid var(--incorrect-color);
}

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

.answer-icon.correct {
    color: var(--success-color);
}

.answer-icon.incorrect {
    color: var(--incorrect-color);
}

.solution-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.solution-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.hint {
    background: #fff9db;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ffd43b;
    font-size: 0.9rem;
    display: none;
}

.hint.show {
    display: block;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.summary {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #ccc;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-value {
    font-weight: 600;
    color: var(--primary-color);
}

.practice-work {
    background: linear-gradient(to right, #e7f1ff, #f0f9ff);
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #3a0ca3;
}

.question-counter {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.time-estimate {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

@media (max-width: 992px) {
    .content {
        flex-direction: column;
    }
    
    .steps-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        max-height: 300px;
    }
    
    .archive-simulator {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-buttons .btn {
        width: 100%;
        margin-right: 0;
    }
}