/* ══════════════════════════════════════════════════════════════
   SHARED STYLES - Общие стили для всех страниц проекта
   Основано на дизайне главной страницы (index.html)
══════════════════════════════════════════════════════════════ */

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

:root {
    --bg:      #070b14;
    --card:    rgba(255,255,255,0.03);
    --border:  rgba(255,255,255,0.07);
    --text:    #f0f4ff;
    --text-2:  #8892aa;
    --text-3:  #4a566a;
    --primary: #667eea;
    --primary-rgb: 102,126,234;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Фоновая сетка ── */
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(102,126,234,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102,126,234,.03) 1px, transparent 1px);
    background-size: 56px 56px;
}

/* ── Фоновые орбы ── */
.orb {
    position: fixed; border-radius: 50%;
    filter: blur(90px); pointer-events: none; z-index: 0;
}
.orb-1 { 
    width:550px; height:550px; 
    background:radial-gradient(circle,rgba(102,126,234,.13),transparent 70%); 
    top:-180px; left:-180px; 
    animation:orb 22s ease-in-out infinite; 
}
.orb-2 { 
    width:380px; height:380px; 
    background:radial-gradient(circle,rgba(118,75,162,.1),transparent 70%);  
    bottom:50px; right:-100px; 
    animation:orb 28s ease-in-out infinite reverse; 
}
.orb-3 { 
    width:280px; height:280px; 
    background:radial-gradient(circle,rgba(59,130,246,.07),transparent 70%); 
    top:55%; left:50%; 
    transform:translate(-50%,-50%); 
    animation:orb 34s ease-in-out infinite 8s; 
}
@keyframes orb { 
    0%,100%{transform:translate(0,0)} 
    33%{transform:translate(35px,-25px)} 
    66%{transform:translate(-20px,20px)} 
}

/* ── Контейнер ── */
.wrap { 
    max-width: 1050px; 
    width:100%; 
    margin:0 auto; 
    padding:0 24px; 
    position:relative; 
    z-index:1; 
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.page-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all .3s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(var(--primary-rgb), .3);
    transform: translateX(-3px);
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(102,126,234,.1);
    border: 1px solid rgba(102,126,234,.25);
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 500;
}

.page-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
}

.page-title span {
    background: linear-gradient(135deg, #667eea, #a78bfa 50%, #60a5fa);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-2);
    max-width: 600px;
}

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    transition: all .3s ease;
}

.card:hover {
    background: rgba(255,255,255,.055);
    border-color: rgba(var(--primary-rgb), .2);
}

.card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -.5px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-2);
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 14px rgba(102,126,234,.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,.55);
}

.btn-secondary {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(var(--primary-rgb), .3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ══════════════════════════════
   INFO BOX
══════════════════════════════ */
.info-box {
    background: rgba(102,126,234,.08);
    border: 1px solid rgba(102,126,234,.2);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
}

.info-box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #a5b4fc;
    margin-bottom: 12px;
}

.info-box-content {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ══════════════════════════════
   PROGRESS BAR
══════════════════════════════ */
.progress-bar {
    background: rgba(255,255,255,.05);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #a78bfa);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(102,126,234,.5);
}

/* ══════════════════════════════
   SCROLL TO TOP
══════════════════════════════ */
#scrollToTop {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(102,126,234,.75);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 17px;
    transition: all .3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(102,126,234,.35);
    align-items: center;
    justify-content: center;
}

#scrollToTop:hover {
    background: rgba(102,126,234,1);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102,126,234,.55);
}

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease both;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease both;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
    .wrap { padding: 0 16px; }
    .page-header { padding: 24px 0 20px; }
    .page-title { letter-spacing: -1px; }
    .card { padding: 24px 20px; }
    .header-top { flex-direction: column; align-items: flex-start; }
}
