/**
 * File: css/style.css
 * Arc Raiders Tracker - Dark Game Theme
 * Version: 4.0
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0a0a12;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER & NAV - DARK STICKY
   ======================================== */
.header {
    background: #12121a;
    border-bottom: 1px solid #2a2a3a;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #00d4ff;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-links a.active {
    color: #00d4ff;
    background: rgba(0,212,255,0.1);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, #0a1628 0%, #12121a 100%);
    padding: 60px 0;
    border-bottom: 1px solid #2a2a3a;
}

.page-header {
    text-align: center;
    padding: 0;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #00d4ff;
    text-shadow: 0 0 30px rgba(0,212,255,0.3);
}

.page-header p {
    font-size: 18px;
    color: #888;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   STATS BAR - DARK CARDS
   ======================================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: -40px auto 40px auto;
    position: relative;
    z-index: 10;
}

.stat-item {
    background: #12121a;
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #2a2a3a;
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-3px);
    border-color: #00d4ff;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   SECTION TITLE
   ======================================== */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #fff;
    text-align: center;
}

/* ========================================
   CATEGORY SECTIONS - DARK CARDS
   ======================================== */
.category-section {
    background: #12121a;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #2a2a3a;
    margin-bottom: 30px;
    overflow: hidden;
}

.category-header {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    border-bottom: 1px solid #2a2a3a;
}

.category-header:hover {
    background: rgba(255,255,255,0.02);
}

.category-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-title.quests { color: #2196F3; }
.category-title.hideout { color: #9C27B0; }
.category-title.workbench { color: #9C27B0; }
.category-title.crafting { color: #FF9800; }
.category-title.recycle { color: #4CAF50; }

.category-count {
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.toggle-icon {
    font-size: 20px;
    color: #555;
    transition: transform 0.3s;
}

.category-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.category-content {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-content.collapsed {
    display: none;
}

/* ========================================
   ITEM CARDS - GAME STYLE
   ======================================== */
.item-card {
    background: linear-gradient(180deg, #1a1a2e 0%, #12121a 100%);
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.item-card:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 25px rgba(0,212,255,0.2);
    transform: translateY(-3px);
}

/* Rarity borders */
.item-card.rarity-common { border-left: 3px solid #9e9e9e; }
.item-card.rarity-uncommon { border-left: 3px solid #4CAF50; }
.item-card.rarity-rare { border-left: 3px solid #2196F3; }
.item-card.rarity-epic { border-left: 3px solid #9C27B0; }
.item-card.rarity-legendary { border-left: 3px solid #FF9800; }

.item-image-section {
    background: linear-gradient(135deg, #0a1628 0%, #0f1a2a 100%);
    padding: 20px;
    position: relative;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image {
    max-width: 100px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.3));
}

.item-quantity {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,193,7,0.9);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
}

.item-details {
    padding: 15px 18px;
}

.item-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.item-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.item-tag.recyclable { background: rgba(0,212,255,0.2); color: #00d4ff; }
.item-tag.rarity { background: rgba(0,212,255,0.2); color: #00d4ff; }
.item-tag.rarity.common { background: rgba(158,158,158,0.2); color: #9e9e9e; }
.item-tag.rarity.uncommon { background: rgba(76,175,80,0.2); color: #4CAF50; }
.item-tag.rarity.rare { background: rgba(33,150,243,0.2); color: #2196F3; }
.item-tag.rarity.epic { background: rgba(156,39,176,0.2); color: #9C27B0; }
.item-tag.rarity.legendary { background: rgba(255,152,0,0.2); color: #FF9800; }

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.item-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    background: rgba(255,255,255,0.03);
    padding: 10px 12px;
    border-radius: 6px;
    font-style: italic;
}

.item-stats {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stat-row:last-child { border-bottom: none; }
.stat-row .stat-name { color: #888; }
.stat-row .stat-val { color: #fff; font-weight: 500; }
.stat-row .stat-val.price { color: #ffc107; }

.item-meta {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #00d4ff;
    color: #0a0a12;
}

.btn-primary:hover {
    background: #00b8e6;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,212,255,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid #2a2a3a;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: #00d4ff;
}

/* ========================================
   EMPTY & LOADING STATES
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #555;
}

.empty-state code {
    background: rgba(0,212,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #00d4ff;
}

.loading {
    text-align: center;
    padding: 60px 24px;
    color: #555;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #0a0a12;
    border-top: 1px solid #2a2a3a;
    margin-top: 60px;
    padding: 50px 0 30px 0;
    font-size: 14px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #2a2a3a;
}

.footer-section h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #00d4ff;
}

.stats-list li {
    display: flex;
    gap: 8px;
    color: #888;
}

.stats-list span {
    font-weight: 600;
    color: #00d4ff;
}

.developer-info {
    color: #888;
    line-height: 1.8;
}

.dev-name {
    color: #00d4ff;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.tech-stack, .version {
    font-size: 12px;
    color: #555;
}

.footer-bottom {
    padding: 30px 0;
    text-align: center;
}

.disclaimer {
    color: #555;
    font-size: 12px;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

.disclaimer a {
    color: #00d4ff;
    text-decoration: none;
}

.footer-terminal {
    background: #000;
    color: #4CAF50;
    padding: 12px 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-top: 30px;
    border-radius: 6px;
}

.status-ok {
    color: #76ff03;
    font-weight: bold;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -20px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .category-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a12;
}

::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a4a;
}

/* ========================================
   FORMS
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: #0a0a12;
    border: 1px solid #2a2a3a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00d4ff;
}

/* ========================================
   CARDS & PANELS
   ======================================== */
.card {
    background: #12121a;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
}

.card:hover {
    border-color: #3a3a4a;
}

.panel {
    background: linear-gradient(135deg, #1a1a2e 0%, #12121a 100%);
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    overflow: hidden;
}

/* ========================================
   MESSAGES
   ======================================== */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: rgba(76,175,80,0.2);
    color: #4CAF50;
    border: 1px solid rgba(76,175,80,0.3);
}

.message.error {
    background: rgba(244,67,54,0.2);
    color: #f44336;
    border: 1px solid rgba(244,67,54,0.3);
}

.message.warning {
    background: rgba(255,152,0,0.2);
    color: #FF9800;
    border: 1px solid rgba(255,152,0,0.3);
}

.message.info {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
    border: 1px solid rgba(0,212,255,0.2);
}