/* Основные стили страницы */
html {
    background: #1a1a2e;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    border: none;
}

/* Стили для шапки */
.header {
    position: relative;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 40px;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.header-title {
    font-size: 1.2em;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 1px;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    min-height: calc(100vh - 200px);
}

h1 {
    font-size: 2.5em;
    font-weight: 300;
    margin: 30px 0 30px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Экран загрузки */
#loading {
    color: #ffffff;
    text-align: center;
    font-size: 1.2em;
    background: transparent;
}

span.loadCircle {
    display: inline-block;
    width: 2em;
    height: 2em;
    vertical-align: middle;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAP1BMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZyFzwnAAAAFHRSTlMAEvRFvX406baecwbf0casimhSHyiwmqgAAADpSURBVHja7dbJbQMxAENRahnN5lkc//5rDRAkDeRgHszXgACJoKiIiIiIiIiIiIiIiIiIiIj4HHspsrpAVhdVVguzrA4OWc10WcEqpwKbnBo0OU1Q5NSpsoJFTgOecrrdEag85DRgktNqfoEdTjnd7hrEHMEJvmRUYJbTYk5Agy6nau6Abp5Cm7mDBtRdPi9gyKdU7w4p1fsLvyqs8hl4z9/w3n/Hmr9WoQ65lAU4d7lMYOz//QboRR5jBZibLMZdAR6O/Vfa1PlxNr3XdS3HzK/HVPRu/KnLs8iAOh993VpRRERERMT/fAN60wwWaVyWwAAAAABJRU5ErkJggg==');
    background-size: 2em 2em;
    margin-right: 0.5em;
    animation: spin 0.6s linear infinite;
    filter: invert(1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* Область результатов */
#shareArea {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin: 40px auto;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 95%;
}

#shareArea > * {
    display: block;
    width: 100%;
    height: auto;
    margin: 0.25em 0;
}

#shareArea h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

#shareArea input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
    margin: 10px 0;
    box-sizing: border-box;
}

#shareArea img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}

/* Политика конфиденциальности */
#privacyPolicy {
    position: fixed;
    top: 2em;
    bottom: 2em;
    left: 2em;
    right: 2em;
    overflow-y: auto;
    width: auto;
    height: auto;
    box-shadow: 0 0 3em 1em rgba(0,0,0,0.8);
    z-index: 999999;
    text-align: left;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2em;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#privacyPolicy h2, #privacyPolicy h4 {
    color: #00d4ff;
}

#privacyPolicy p, #privacyPolicy li {
    color: #cccccc;
    line-height: 1.6;
}

a.privacy {
    text-align: center;
    font-size: 0.8em;
    color: #cccccc;
    padding: 0 3em;
    transition: color 0.3s ease;
}

a.privacy:hover {
    color: #00d4ff;
}

div.closePrivacyPolicy {
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

div.closePrivacyPolicy a.privacy {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

div.closePrivacyPolicy a.privacy:hover {
    background: linear-gradient(135deg, #00e6ff 0%, #00b3e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Футер */
.footer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 60px;
}

.footer-left {
    color: #cccccc;
    font-size: 0.9em;
}

.footer-right a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: #00d4ff;
}

/* Утилитарные классы для управления видимостью */
.visible {
    display: block !important;
}

.hidden {
    display: none !important;
}

/* Стили для начального экрана и интерфейса теста */
.initial-screen {
    display: block;
}

.initial-screen.hidden {
    display: none !important;
}

.test-interface {
    display: none;
}

.test-interface.visible {
    display: block !important;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        min-height: calc(100vh - 150px);
    }
    
    .header {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .header-logo img {
        width: 28px;
        height: 28px;
    }
    
    .header-title {
        font-size: 1em;
    }
    
    h1 {
        font-size: 2em;
        margin: 20px 0 20px 0;
    }
    
    .footer {
        padding: 15px 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin-top: 40px;
    }
    
    .footer-left,
    .footer-right {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .header {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .header-logo img {
        width: 24px;
        height: 24px;
    }
    
    .header-title {
        font-size: 0.9em;
    }
    
    .container {
        min-height: calc(100vh - 120px);
    }
}