/* --- ПЕРЕМЕННЫЕ И ЦВЕТА --- */
:root {
    --bg-color: #050705;
    --main-color: #00b4d8;
    --main-hover: #0096c7;
    --card-bg: rgba(10, 15, 10, 0.75);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-color: #e2e8f0;
    --text-muted: #8ca395;
}

/* --- ОБЩИЕ СТИЛИ СТРАНИЦЫ --- */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    background-color: var(--bg-color);
    
    /* Заметный, глубокий темно-зеленый и изумрудный перелив */
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(16, 185, 129, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(4, 120, 87, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, #000000 0%, transparent 100%);
    background-attachment: fixed;
    
    /* Идеально плавная, замедленная анимация */
    background-size: 200% 200%;
    animation: gradientShift 40s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 30%; }
    50% { background-position: 100% 70%; }
    100% { background-position: 30% 100%; }
}

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

/* --- ШАПКА И НАВИГАЦИЯ --- */
header {
    background: rgba(5, 7, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--main-color);
}

/* --- ГЕРОЙСКИЙ БЛОК --- */
.hero {
    text-align: center;
    padding: 60px 0 30px 0;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 15px;
    color: #fff;
}

/* --- МОДУЛЬ SPEEDTEST И ЗАГРУЗКА --- */
.speedtest-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    backdrop-filter: blur(8px);
}

.speed-display {
    font-size: 48px;
    font-weight: 800;
    color: var(--main-color);
    margin: 15px 0;
    font-family: monospace;
    text-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.btn-test {
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-test:hover {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.4);
}

.upload-zone {
    border: 2px dashed var(--card-border);
    background: rgba(255,255,255,0.01);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
    border-color: var(--main-color);
    background: rgba(0, 180, 216, 0.02);
}

/* --- СЕТКА ГАЛЕРЕИ И КАРТОЧКИ --- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.media-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
}

.media-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 180, 216, 0.3);
}

.media-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.badge-video, .badge-photo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-video { color: #00b4d8; border: 1px solid rgba(0,180,216,0.3); }
.badge-photo { color: #a855f7; border: 1px solid rgba(168,85,247,0.3); }

.media-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #fff;
    word-break: break-all;
}

.btn-download {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* --- СТИЛИ ДЛЯ ФОРМЫ СВЯЗИ --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid var(--card-border);
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff !important;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--main-color);
}

select.form-control option {
    background: #050705;
    color: #fff;
}

.btn-submit {
    background: var(--main-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* --- СТИЛИ ЧАТА ТЕХПОДДЕРЖКИ --- */
.chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.4);
}

.chat-window {
    display: none;
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    height: 400px;
    background: #050705;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.6);
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #0f140f;
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
}

.msg.bot { background: rgba(255,255,255,0.05); color: #fff; align-self: flex-start; }
.msg.user { background: var(--main-color); color: #fff; align-self: flex-end; }

.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--card-border);
    background: #020302;
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
}

/* --- ФУТЕР --- */
footer {
    text-align: center;
    padding: 40px 0;
    color: #3b4c41;
    font-size: 13px;
    border-top: 1px solid var(--card-border);
    margin-top: 60px;
}
