/* Базовые стили для кнопок и алертов */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Стили модуля Weapon Paints */
.weapon-paints-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.team-selector {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.team-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.btn-t, .btn-ct {
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-t {
    background: #8B4513;
}

.btn-t:hover, .btn-t.active {
    background: #A0522D;
    transform: translateY(-2px);
}

.btn-ct {
    background: #4169E1;
}

.btn-ct:hover, .btn-ct.active {
    background: #5B7BD9;
    transform: translateY(-2px);
}

.weapons-section, .knives-section {
    margin-bottom: 40px;
}

.agents-section {
    margin-bottom: 40px;
}

/* Стили для красивых заголовков */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header-icon {
    font-size: 2.5em;
    margin-right: 15px;
    display: inline-block;
    animation: iconGlow 2.6s linear infinite;
    vertical-align: middle;
}

/* Team switch */
.team-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px auto 20px auto;
}
.team-switch .team-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.team-switch .team-btn .icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}
.team-switch .team-btn.active {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
}

/* Weapons filter */
.weapons-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px 0;
    justify-content: center;
}
.weapons-filter .filter-btn {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.weapons-filter .filter-btn.active {
    border-color: #0dcaf0;
    background: rgba(13, 202, 240, 0.15);
}

/* Иконки фильтров: красим в белый силуэт */
.weapons-filter .filter-btn .filter-icon {
    width: 45px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
}

.gradient-text {
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.header-subtitle {
    color: #b0b3b8;
    font-size: 1.1em;
    margin-top: 8px;
    font-weight: 300;
    opacity: 0.9;
}

/* Анимации */
@keyframes iconGlow {
    0% { 
        transform: rotate(0deg) scale(1);
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
    25% { 
        transform: rotate(5deg) scale(1.08);
        filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    }
    50% { 
        transform: rotate(0deg) scale(1.05);
        filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
    75% { 
        transform: rotate(-5deg) scale(1.08);
        filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    }
    100% { 
        transform: rotate(0deg) scale(1);
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.agent-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card > * {
    position: relative;
    z-index: 2;
}

.agent-image { 
    text-align: center; 
    margin-bottom: -8px; 
}

.agent-image img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 5px; 
}

/* Стили для заголовков команд */
.team-title {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    padding: 4px 15px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.terrorist-title {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.terrorist-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

.ct-title {
    background: linear-gradient(135deg, #3742fa, #5352ed);
    color: white;
    box-shadow: 0 4px 15px rgba(55, 66, 250, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ct-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.weapons-grid, .knives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.weapon-card, .knife-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.weapon-card:hover, .knife-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.weapon-image, .knife-image {
    text-align: center;
    margin-bottom: 15px;
}

.weapon-image img, .knife-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.weapon-info h4, .knife-info h4 {
    margin: 0 0 15px 0;
    color: #e7eaef;
    text-align: center;
}

.skin-selector, .wear-seed-selector {
    margin-bottom: 10px;
}

.skin-selector label, .wear-selector label, .wear-field label, .seed-field label {
    display: block;
    margin-bottom: 5px;
    color: #b0b3b8;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.skin-select, .wear-select {
    width: 100%;
    padding: 7px 3px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e7eaef;
    font-size: 0.72em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skin-select:focus, .wear-select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.skin-select:hover, .wear-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wear-seed-selector {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

/* Стили для полей износа и паттерна */
.wear-input, .seed-input {
    width: 100%;
    padding: 7px 3px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e7eaef;
    font-size: 0.72em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Убираем стрелки у number input */
.wear-input::-webkit-outer-spin-button,
.wear-input::-webkit-inner-spin-button,
.seed-input::-webkit-outer-spin-button,
.seed-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wear-input[type=number],
.seed-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.wear-input:focus, .seed-input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.wear-input:hover, .seed-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wear-input::placeholder, .seed-input::placeholder {
    color: #8a8a8a;
    font-size: 0.85em;
}

/* Стили для option элементов в выпадающих списках */
.skin-select option, .wear-select option {
    background: #2c2c2c;
    color: #e7eaef;
    padding: 8px 12px;
    font-size: 0.85em;
}

.skin-select option:hover, .wear-select option:hover {
    background: #3c3c3c;
    color: #ffffff;
}

.skin-select option:checked, .wear-select option:checked {
    background: #4ecdc4;
    color: #000000;
    font-weight: 600;
}

.wear-field, .seed-field {
    flex: 1;
}

.select-knife {
    width: 100%;
    margin-top: 10px;
}

.save-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#saveLoadout {
    padding: 15px 30px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

#saveLoadout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
    background: linear-gradient(135deg, #5dd5c4, #4a9b8a);
}

#saveLoadout:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(78, 205, 196, 0.3);
}

@media (max-width: 768px) {
    .agents-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .weapons-grid, .knives-grid {
        grid-template-columns: 1fr;
    }
    
    .team-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Стили для контейнера авторизации */
.auth-required-container {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 40px 0;
    color: white;
}

.auth-required-container .auth-content {
    max-width: 600px;
    margin: 0 auto;
}

.auth-required-container .auth-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.auth-required-container .auth-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: white;
}

.auth-required-container .auth-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.auth-required-container .auth-features {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
}

.auth-required-container .auth-features h3 {
    margin-bottom: 15px;
    color: white;
}

.auth-required-container .auth-features ul {
    text-align: left;
    list-style: none;
    padding: 0;
}

.auth-required-container .auth-features li {
    margin: 10px 0;
    padding-left: 30px;
    position: relative;
}

.auth-required-container .auth-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
}

.auth-required-container .auth-note {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Стили для перчаток */
.glove-selector {
    margin-top: 10px;
}

.glove-selector label {
    display: block;
    margin-bottom: 5px;
    color: #b0b3b8;
    font-size: 0.8em;
}

.glove-preview {
    text-align: center;
    margin-bottom: 10px;
}

.glove-preview img {
    max-width: 140px;
    height: auto;
    border-radius: 5px;
}

/* Music kit UI on agent cards */
.music-block { margin-top: 8px; }
.music-block label { display:block; font-size:12px; color:#b0b3b8; margin-bottom:6px; letter-spacing:.02em; text-transform:uppercase; }
.music-row { display:flex; align-items:center; gap:10px; padding:8px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:10px; }
.music-thumb { width:42px; height:42px; border-radius:6px; object-fit:cover; box-shadow:0 4px 10px rgba(0,0,0,.25); background:#0e1016; }
.music-select { max-width: 280px; flex:1; height:40px; background:#10131b; border:1px solid rgba(255,255,255,0.08); color:#e7eaef; border-radius:8px; padding:8px 10px; }

/* Team title icon */
.team-title .team-title-icon { width:20px; height:20px; vertical-align:middle; margin-right:8px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }

/* Settings modal */
.wp-settings-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.wp-settings-modal {
    width: min(560px, 92vw);
    background: #1b1f2a;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    padding: 18px;
    color: #e7eaef;
}
.wp-settings-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.wp-settings-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
}
.wp-settings-modal .modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.wp-settings-modal .row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.wp-settings-modal .row > div { flex: 1; }

/* Enhanced controls */
.wp-row { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.wp-field label{ display:block; font-size:13px; color:#9aa4b2; margin-bottom:6px; }
.wp-input,.wp-select{ width:100%; height:40px; background:#0f1117; border:1px solid rgba(255,255,255,0.06); border-radius:8px; color:#e6e9ef; padding:8px 12px; }
.wp-slider{ appearance:none; width:100%; height:6px; border-radius:999px; background:linear-gradient(90deg,#65f0a3 0%,#b3e561 20%,#ffd463 45%,#ff9c5c 70%,#ff6262 100%); outline:none; }
.wp-slider::-webkit-slider-thumb{ appearance:none; width:16px; height:16px; border-radius:50%; background:#fff; border:2px solid #6b8cff; box-shadow:0 2px 8px rgba(0,0,0,.35); cursor:pointer; }
.wp-chips{ display:flex; gap:8px; }
.wp-chip{ padding:6px 10px; border-radius:8px; border:1px solid rgba(255,255,255,.08); background:#0e1016; color:#cfd7e3; font-size:12px; cursor:pointer; }
.wp-chip.active{ color:#e6f0ff; border-color:#6b8cff; box-shadow:0 0 0 2px rgba(107,140,255,.15) inset; background:#111622; }
.wp-toggle{ display:inline-flex; align-items:center; gap:10px; }
.switch{ position:relative; display:inline-block; width:44px; height:24px; }
.switch input{ display:none; }
.slider{ position:absolute; cursor:pointer; inset:0; background:#2a2f3a; border-radius:99px; transition:background .2s ease; }
.slider:before{ position:absolute; content:""; height:18px; width:18px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:transform .2s ease; }
input:checked + .slider{ background:#6b8cff; }
input:checked + .slider:before{ transform:translateX(20px); }
.wp-actions{ margin-top:18px; display:flex; justify-content:flex-end; }
.wp-btn{ height:42px; padding:0 18px; border-radius:10px; border:none; color:#fff; background:linear-gradient(90deg,#6b8cff,#9b6bff); cursor:pointer; }

/* StatTrak button styles */
.st-btn{ display:inline-flex; margin-top: 27px; align-items:center; justify-content:center; height:40px; padding:0 16px; border-radius:10px; background:#262221; border:1px solid #ff6b4a66; color:#ff6b4a; cursor:pointer; user-select:none; transition:filter .15s ease, transform .1s ease; box-sizing:border-box; width:140px; }
.st-btn:hover{ filter:brightness(1.05); }
.st-btn:active{ transform:translateY(1px); }
.st-btn.on{ background:#1f2a24; border-color:#6bdd8b66; color:#6bdd8b; }

/* Align StatTrak button row */
#wpSettingsBackdrop .row { align-items: center; }
#modalStattrakBtn { margin-right: 12px; }

.settings-btn {
    width: 100%;
    margin-top: 8px;
    background: linear-gradient(135deg, #5468ff, #7f53ac);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.settings-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.settings-btn:active { transform: translateY(0); }