:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --accent: #fd79a8;
    --dark: #2d3436;
    --light: #f5f6fa;
    --success: #00b894;
    --warning: #fdcb6e;
    --error: #e84393;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #dfe6e9, #b2bec3);
    min-height: 100vh;
    color: var(--dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.7;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb-separator {
    opacity: 0.5;
}

.main-content {
    padding: 2rem 0;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

.calculator-panel {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: sticky;
    top: 120px;
}

.panel-header {
    margin-bottom: 2rem;
}

.panel-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.panel-subtitle {
    color: var(--dark);
    opacity: 0.7;
    font-size: 1rem;
}

.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--dark);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.input-group {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark);
    opacity: 0.6;
    font-size: 0.9rem;
    pointer-events: none;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--dark);
    opacity: 0.6;
    margin-top: 0.25rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 112, 85, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    margin: 0.5rem 0.5rem 0.5rem 0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
}

.results-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.result-card.highlight {
    border-left: 4px solid var(--primary);
}

.result-label {
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.result-value.positive {
    color: var(--success);
}

.result-secondary {
    font-size: 0.8rem;
    color: var(--dark);
    margin-top: 0.5rem;
    opacity: 0.7;
}

.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-card h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-item:last-child {
    margin-bottom: 0;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.schedule-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.schedule-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.schedule-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.schedule-filter {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.schedule-table th {
    background: rgba(108, 92, 231, 0.1);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.schedule-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

.schedule-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.schedule-table .number {
    font-weight: 600;
    color: var(--primary);
}

.schedule-table .currency {
    font-weight: 500;
}

.schedule-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(225, 112, 85, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.8;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    opacity: 0.7;
}

footer a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.link-separator {
    color: rgba(45, 52, 54, 0.3);
    user-select: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 52, 54, 0.5);
    backdrop-filter: blur(15px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    color: var(--dark);
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(225, 112, 85, 0.2);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-body {
    margin-bottom: 2rem;
    color: var(--dark);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(225, 112, 85, 0.2);
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(225, 112, 85, 0.1);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: var(--dark);
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    line-height: 1;
}

.close:hover {
    opacity: 1;
    background: rgba(225, 112, 85, 0.2);
    transform: rotate(90deg);
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 112, 85, 0.3);
}

.modal a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 768px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-panel {
        position: static;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .summary-section {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .results-header,
    .schedule-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .export-buttons,
    .schedule-controls {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .calculator-panel,
    .results-panel,
    .schedule-section {
        padding: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .link-separator {
        display: none;
    }
}

@media print {
    .header,
    .export-buttons,
    .schedule-controls,
    .schedule-pagination {
        display: none;
    }

    body {
        background: white;
    }

    .calculator-panel,
    .results-panel,
    .schedule-section {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
