/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --primary-red: #e63946;
    --dark-red: #9d0208;
    --deep-red: #6a040f;
    --primary-orange: #f77f00;
    --dark-orange: #d62828;
    --primary-yellow: #fcbf49;
    --light-yellow: #ffd166;
    --accent-red: #ff4d6d;
    --accent-yellow: #ffbe0b;
    
    --bg-dark: #0d0d0d;
    --bg-darker: #050505;
    --bg-card: #1a1a1a;
    --bg-card-hover: #252525;
    
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    
    --gradient-fire: linear-gradient(135deg, var(--dark-red), var(--primary-orange), var(--primary-yellow));
    --gradient-sunset: linear-gradient(45deg, var(--deep-red), var(--primary-red), var(--primary-orange));
    --gradient-warm: linear-gradient(180deg, var(--primary-orange), var(--primary-yellow));
    
    --shadow-glow: 0 0 30px rgba(230, 57, 70, 0.3);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    --success-green: #2ecc71;
    --error-red: #e74c3c;
    --warning-orange: #f39c12;
}

/* ========== КАСТОМНЫЙ СКРОЛЛБАР ========== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-sunset);
    border-radius: 6px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-fire);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

::-webkit-scrollbar-corner {
    background: var(--bg-darker);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) var(--bg-darker);
}

/* ========== СБРОС И БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(230, 57, 70, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(247, 127, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(252, 191, 73, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

/* ========== ХЕДЕР ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(230, 57, 70, 0.5));
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

nav ul li a {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-fire);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

nav ul li a:hover {
    color: var(--text-primary);
}

nav ul li a:hover::before,
nav ul li a.active::before {
    width: 80%;
}

nav ul li a.active {
    color: var(--primary-yellow);
}

.discord-btn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #5865F2, #7289da);
    padding: 10px 20px !important;
    border-radius: var(--border-radius) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5);
}

.discord-btn-header::before {
    display: none !important;
}

/* ========== APPLICATION HERO SECTION ========== */
.application-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 100px;
    padding: 4rem 0;
}

.application-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(230, 57, 70, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(252, 191, 73, 0.15) 0%, transparent 50%);
    z-index: -1;
}

.application-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.application-title h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.application-title p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== TEAM SELECTION SECTION ========== */
.team-selection-section {
    padding: 4rem 0;
    position: relative;
}

.team-selection {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(230, 57, 70, 0.2);
    text-align: center;
}

.team-selection h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.team-selection h2 i {
    margin-right: 10px;
}

.team-selection > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.team-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.team-option {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 2px solid rgba(230, 57, 70, 0.1);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-option:hover {
    border-color: var(--primary-orange);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.team-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.team-icon i {
    font-size: 2.5rem;
    color: var(--bg-dark);
}

.team-option h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.team-option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.team-requirements {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.team-requirements span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.team-requirements i {
    color: var(--primary-orange);
}

.team-select-btn {
    background: var(--gradient-sunset);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 100%;
    margin-top: auto;
}

.team-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.4);
}

.team-select-btn.selected {
    background: linear-gradient(135deg, var(--success-green) 0%, #27ae60 100%);
    color: white;
}

.selected-team-indicator {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--success-green);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeIn 0.3s ease;
}

.selected-team-indicator i {
    color: var(--success-green);
    font-size: 1.5rem;
}

.selected-team-indicator span {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.change-team-btn {
    background: transparent;
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-left: auto;
}

.change-team-btn:hover {
    background: rgba(252, 191, 73, 0.1);
}

/* ========== APPLICATION FORM SECTION ========== */
.application-form-section {
    padding: 4rem 0;
    position: relative;
}

.form-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(230, 57, 70, 0.2);
    position: relative;
    z-index: 2;
}

/* ========== FORM HEADER ========== */
.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.form-header h2 i {
    margin-right: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== FORM GROUPS ========== */
.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary-yellow);
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: var(--transition-normal);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-yellow);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(252, 191, 73, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========== SELECT STYLING ========== */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fcbf49'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 3rem;
    cursor: pointer;
}

.form-group select option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding: 1rem;
}

/* ========== VALIDATION STATES ========== */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-red);
    background: rgba(231, 76, 60, 0.1);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2);
}

.form-group.error label {
    color: var(--error-red);
}

.form-group.error .field-requirements {
    color: rgba(231, 76, 60, 0.8);
}

.form-group.error select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e74c3c'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: var(--success-green);
    background: rgba(46, 204, 113, 0.1);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
}

.form-group.success label {
    color: var(--success-green);
}

/* ========== FIELD MESSAGES ========== */
.field-error-message {
    display: none;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error-red);
    border-radius: 6px;
    color: var(--error-red);
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
    border-left: 4px solid var(--error-red);
}

.field-error-message i {
    margin-right: 0.5rem;
}

.field-success-message {
    display: none;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--success-green);
    border-radius: 6px;
    color: var(--success-green);
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
    border-left: 4px solid var(--success-green);
}

.field-success-message i {
    margin-right: 0.5rem;
}

.field-requirements {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: normal;
}

/* ========== CHARACTER COUNTER ========== */
.char-counter {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: var(--warning-orange);
    font-weight: 600;
}

.char-counter.error {
    color: var(--error-red);
    font-weight: 700;
}

/* ========== AGE REQUIREMENT ========== */
.age-requirement {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(252, 191, 73, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-yellow);
}

.age-requirement i {
    color: var(--primary-yellow);
    font-size: 1.2rem;
}

.age-requirement p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========== CHECKBOX GROUP ========== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(252, 191, 73, 0.05);
    border-radius: 8px;
}

.checkbox-group.error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--error-red);
}

.checkbox-group.error label {
    color: var(--error-red);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-yellow);
}

.checkbox-group.error input[type="checkbox"] {
    accent-color: var(--error-red);
}

.checkbox-group label {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* ========== SUBMIT BUTTON ========== */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--gradient-sunset);
    color: white;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.5);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== BLOCKED OVERLAY ========== */
.blocked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    border-radius: var(--border-radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.blocked-message {
    text-align: center;
    padding: 2rem;
    max-width: 80%;
}

.blocked-message i {
    font-size: 3rem;
    color: var(--success-green);
    margin-bottom: 1rem;
}

.blocked-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--success-green);
}

.blocked-message p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ========== STATUS MESSAGES ========== */
.status-message {
    display: none;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.status-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

.status-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.status-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--warning-orange);
    color: var(--warning-orange);
}

/* ========== ФУТЕР ========== */
footer {
    background: var(--bg-darker);
    padding: 50px 0;
    border-top: 1px solid rgba(230, 57, 70, 0.2);
    position: relative;
    z-index: 1;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-fire);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo i {
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copyright p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes validationPulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.validation-pulse {
    animation: validationPulse 0.5s ease;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1200px) {
    .container {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .application-hero {
        padding-top: 160px;
        margin-top: 0;
    }
    
    .application-title h1 {
        font-size: 2.2rem;
    }
    
    .application-title p {
        font-size: 1rem;
    }
    
    .team-options {
        grid-template-columns: 1fr;
    }
    
    .team-selection {
        padding: 2rem;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .selected-team-indicator {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .change-team-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .application-title h1 {
        font-size: 1.8rem;
    }
    
    .team-selection {
        padding: 1.5rem;
    }
    
    .team-option {
        padding: 1.5rem;
    }
    
    .team-icon {
        width: 70px;
        height: 70px;
    }
    
    .team-icon i {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.8rem;
    }
    
    .form-group select {
        padding-right: 2.5rem;
        background-size: 1.2em;
    }
}

@media (max-width: 360px) {
    .container {
        width: 95%;
    }
    
    .application-title h1 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .form-group select {
        font-size: 0.9rem;
    }
}