@font-face {
    font-family: 'Sansation';
    src: url('../Sansation-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-primary-dark: linear-gradient(135deg, #445b54 0%, #324641 50%, #223330 100%);
    --bg-primary-light: linear-gradient(135deg, #f5fdfb 0%, #d8ede6 50%, #a1b7ae 100%);
    
    --text-primary-dark: #ffffff;
    --text-primary-light: #2c3e50;
    
    --text-secondary-dark: #e8e8e8;
    --text-secondary-light: #555555;
    
    --bg-content-dark: #1a1a1a;
    --bg-content-light: #ffffff;
    
    --border-dark: #333333;
    --border-light: #ecf0f1;
    
    --link-dark: #b8d8d8;
    --link-light: #2d7a6f;
    
    --accent-dark: #1e3932;
    --accent-light: #dceae6;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg-primary-dark);
    background-attachment: fixed;
    color: var(--text-primary-dark);
    padding: 20px;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

html[data-theme="light"] body {
    background: var(--bg-primary-light);
    color: var(--text-primary-light);
}

.logo {
    position: absolute;
    top: 5px;
    left: 15px;
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.theme-toggle button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-primary-dark);
    -webkit-appearance: none;
    appearance: none;
}

html[data-theme="light"] .theme-toggle button {
    color: var(--text-primary-light);
}

.theme-toggle button:hover {
    transform: scale(1.15);
}

.theme-toggle button:focus {
    outline: none;
}

.theme-toggle button span {
    display: none;
}

.theme-toggle button span.active {
    display: inline;
}

.theme-toggle button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(26, 26, 26, 0.85);
    padding: 20px 40px 40px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(2px);
}

html[data-theme="light"] .container {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.language-selector {
    text-align: right;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-dark);
    transition: border-color 0.3s ease;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

html[data-theme="light"] .language-selector {
    border-bottom-color: var(--border-light);
}

.language-selector a {
    color: var(--link-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

html[data-theme="light"] .language-selector a {
    color: var(--link-light);
}

.language-selector a:hover {
    text-decoration: underline;
}

.language-selector a.active {
    color: var(--text-primary-dark);
    font-weight: bold;
}

html[data-theme="light"] .language-selector a.active {
    color: var(--text-primary-light);
}

h1 {
    color: var(--text-primary-dark);
    font-size: 2em;
    margin-bottom: 10px;
    border-bottom: 3px solid var(--link-dark);
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="light"] h1 {
    color: var(--text-primary-light);
    border-bottom-color: var(--link-light);
}

h2 {
    color: var(--text-primary-dark);
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

html[data-theme="light"] h2 {
    color: var(--text-primary-light);
}

h3 {
    color: var(--text-secondary-dark);
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

html[data-theme="light"] h3 {
    color: var(--text-secondary-light);
}

p {
    margin-bottom: 15px;
    text-align: left;
    color: var(--text-secondary-dark);
    transition: color 0.3s ease;
}

html[data-theme="light"] p {
    color: var(--text-secondary-light);
}

ul, ol {
    margin-left: 0;
    padding-left: 1.5em;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
    color: var(--text-secondary-dark);
    transition: color 0.3s ease;
}

html[data-theme="light"] li {
    color: var(--text-secondary-light);
}

strong {
    color: var(--text-primary-dark);
    transition: color 0.3s ease;
}

html[data-theme="light"] strong {
    color: var(--text-primary-light);
}

.header-subtitle {
    color: var(--text-secondary-dark);
    font-size: 1.2em;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

html[data-theme="light"] .header-subtitle {
    color: var(--text-secondary-light);
}

.info-box {
    background: var(--accent-dark);
    padding: 20px;
    border-left: 4px solid var(--link-dark);
    margin: 20px 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

html[data-theme="light"] .info-box {
    background: var(--accent-light);
    border-left-color: var(--link-light);
}

.info-box p {
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box ul {
    margin-top: 10px;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-dark);
    color: var(--text-secondary-dark);
    font-size: 0.9em;
    transition: border-color 0.3s ease, color 0.3s ease;
}

html[data-theme="light"] .footer {
    border-top-color: var(--border-light);
    color: var(--text-secondary-light);
}

a {
    color: var(--link-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

html[data-theme="light"] a {
    color: var(--link-light);
}

a:hover {
    text-decoration: underline;
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        padding: 20px;
    }
    
    .language-selector {
        display: none;
    }

    .logo {
        display: none;
    }

    .theme-toggle {
        display: none;
    }
}

@media (max-width: 899px) and (min-width: 641px) {
    .theme-toggle {
        position: absolute;
        top: 40px;
        right: 40px;
        z-index: 10;
    }

    .language-selector {
        text-align: right;
        margin-bottom: 20px;
        padding-bottom: 20px;
        padding-right: 50px;
        border-bottom: 1px solid var(--border-dark);
        transition: border-color 0.3s ease;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 15px;
    }
}

@media (max-width: 640px) {
    .logo {
        top: 5px;
        left: 12px;
    }

    .theme-toggle {
        position: absolute;
        top: 40px;
        right: 40px;
        z-index: 10;
    }

    .language-selector {
        text-align: right;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-dark);
        transition: border-color 0.3s ease;
        padding-right: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 15px;
    }

    .theme-toggle button {
        margin: 0;
    }

    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    h2 {
        font-size: 1.3em;
    }
}

@media (max-width: 400px) {
    .logo {
        top: 5px;
        left: 10px;
    }

    .theme-toggle {
        top: 40px;
        right: 40px;
    }

    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.3em;
    }

    h2 {
        font-size: 1.1em;
    }
}