/* ===== CSS Variables ===== */
:root {
    --primary: #FF6B35;
    --secondary: #1A1A2E;
    --accent: #00D4FF;
    --bg: #0D0D14;
    --surface: #16162A;
    --surface-hover: #1E1E38;
    --text: #E8E8E8;
    --text-muted: #8888AA;
    --border: #2A2A40;
    
    --rarity-consumer: #B0C3D9;
    --rarity-industrial: #5E98D9;
    --rarity-milspec: #4B69FF;
    --rarity-restricted: #8847FF;
    --rarity-classified: #D32CE6;
    --rarity-covert: #EB4B4B;
    
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --glow: 0 0 30px rgba(255,107,53,0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    perspective: 1000px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-accent {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input {
    width: 220px;
    padding: 10px 12px 10px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #ff7a4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--text-muted);
}

.btn-hero {
    background: linear-gradient(135deg, var(--primary), #ff7a4a);
    color: #fff;
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-price {
    margin-bottom: 32px;
}

.price-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(235, 75, 75, 0.4) 0%, rgba(255, 107, 53, 0.2) 40%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
}

.hero-skin-img {
    width: 500px;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 40px rgba(235, 75, 75, 0.6));
    animation: rotateFloat 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes rotateFloat {
    0%, 100% {
        transform: rotateY(-15deg) translateY(0);
    }
    50% {
        transform: rotateY(15deg) translateY(-15px);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Main Content ===== */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Filter Bar ===== */
.filter-bar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 11;
}

.chip:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.chip.active {
    background: var(--rarity-color, var(--primary));
    border-color: var(--rarity-color, var(--primary));
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.price-filter {
    align-items: center;
}

.price-input {
    width: 100px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-divider {
    color: var(--text-muted);
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    gap: 40px;
    padding: 20px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Skin Grid ===== */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skin-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skin-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--card-rarity, var(--primary));
}

.skin-card:hover .card-glow {
    opacity: 1;
}

.card-image {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center bottom, var(--card-rarity, var(--primary)) 0%, transparent 70%);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.card-weapon {
    width: 180px;
    height: 60px;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.skin-card:hover .card-weapon {
    transform: scale(1.05);
}

.rarity-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-rarity, var(--rarity-milspec));
    box-shadow: 0 0 10px var(--card-rarity, var(--rarity-milspec));
}

.card-info {
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-weapon-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.rarity-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--card-rarity, var(--rarity-milspec));
    color: #fff;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.card-price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.card-wear {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg);
    border-radius: 4px;
}

/* ===== Forum ===== */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.forum-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.forum-threads {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    gap: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.thread-card:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.thread-content {
    flex: 1;
    min-width: 0;
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.thread-category {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.thread-category.trading { background: #5E98D9; }
.thread-category.prices { background: #4B69FF; }
.thread-category.showcase { background: #8847FF; }
.thread-category.questions { background: #D32CE6; }

.thread-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.thread-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.thread-replies {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.thread-replies svg {
    width: 16px;
    height: 16px;
}

.thread-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Trades ===== */
.trades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.trade-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.trade-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #ff7a4a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.trade-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-user {
    font-weight: 600;
    color: var(--text);
}

.trade-action {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trade-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

/* ===== Prices Table ===== */
.prices-table {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.prices-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.price-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s ease;
}

.price-row:hover {
    background: var(--surface-hover);
}

.price-row span {
    font-size: 0.95rem;
}

.skin-name {
    color: var(--text);
}

.price-fn {
    color: var(--accent);
    font-weight: 600;
}

.price-mw {
    color: var(--text-muted);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary);
    color: #fff;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, var(--glow-color, var(--primary)) 0%, transparent 70%);
    opacity: 0.5;
}

.modal-weapon {
    width: 280px;
    height: 90px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px var(--glow-color, var(--primary)));
}

.modal-content {
    padding: 24px;
}

.modal-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #fff;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-weapon-type {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-stats {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.modal-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.modal-stat-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.modal-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

/* Thread Modal */
.thread-modal {
    max-width: 500px;
    padding: 32px;
}

.thread-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 300px;
}

.footer-desc {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .awp-silhouette {
        width: 280px;
    }
    
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 24px;
        gap: 16px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .search-box {
        order: 2;
    }
    
    .search-input {
        width: 180px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-bar {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .price-value {
        font-size: 2rem;
    }
    
    .skin-grid {
        grid-template-columns: 1fr;
    }
    
    .thread-card {
        flex-direction: column;
    }
    
    .thread-avatar {
        width: 40px;
        height: 40px;
    }
    
    .thread-stats {
        flex-direction: row;
        align-items: center;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
