/* ====================================
   LOOT PAGE STYLES
   ==================================== */

/* Ensure proper body spacing for fixed top bar */
body {
    padding-top: 60px !important;
}

/* Main content container */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth gate (match gold/raidlogs) */
.auth-gate {
    background: #111827;
    color: #e5e7eb;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 24px;
    max-width: 720px;
    margin: 75px auto;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.auth-gate h2 { margin: 0 0 8px 0; font-size: 20px; }
.auth-gate p { margin: 6px 0; color: #cbd5e1; }
.auth-gate .lock {
    width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #0b1220; border: 1px solid #1f2937; color: #93c5fd; margin-bottom: 10px;
}
.auth-gate .actions { display:flex; gap:12px; justify-content:center; margin-top: 10px; }
.auth-gate .discord-button { display:inline-flex; align-items:center; gap:8px; }
.auth-gate .join-link { display:block; margin-top:8px; color:#93c5fd; text-decoration:underline; }

.import-section {
    background: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto 30px auto;
    max-width: 800px;
}

.import-section h3 {
    color: #f0f0f0;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.import-section p {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.import-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.import-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #111827;
    font-size: 0.95em;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.import-input-container {
    width: 100%;
}

.import-input-container textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    resize: vertical;
    box-sizing: border-box;
}

.import-input-container textarea:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
}

.import-input-container textarea::placeholder {
    color: #9ca3af;
}

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

.import-btn, .clear-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.import-btn:hover {
    background: linear-gradient(135deg, #059669, #2cc08b);
    transform: translateY(-1px);
}

.import-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.clear-btn {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    transform: translateY(-1px);
}

.import-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    display: none;
}

.import-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #065f46;
    display: block;
}

.import-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #7f1d1d;
    display: block;
}

.import-status.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #1e3a8a;
    display: block;
}

/* ====================================
   LOOT DISPLAY STYLES
   ==================================== */

.loot-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto;
    max-width: 800px;
}

.loot-section h3 {
    color: #111827;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* ====================================
   DASHBOARD STATISTICS STYLES
   ==================================== */

.stats-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a, #252525);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #007acc;
    box-shadow: 0 8px 25px rgba(0, 122, 204, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007acc, #20c997);
}

.stat-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
    display: block;
}

.stat-card.total-items .stat-icon {
    color: #007acc;
}

.stat-card.total-gold .stat-icon {
    color: #ffd700;
}

.stat-card.expensive-item .stat-icon {
    color: #e74c3c;
}

.stat-card.biggest-spender .stat-icon {
    color: #28a745;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #f0f0f0;
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    font-size: 0.9em;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-detail {
    font-size: 0.85em;
    color: #aaa;
    font-style: italic;
    margin-top: 8px;
}

.stat-card.no-data {
    opacity: 0.6;
    background: linear-gradient(135deg, #1a1a1a, #1f1f1f);
}

.stat-card.no-data .stat-value {
    color: #888;
}

.stat-card.no-data::before {
    background: #555;
}

.loot-list {
    min-height: 200px;
}

.loot-items-container {
    display: grid;
    gap: 12px;
}

.loot-item {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.loot-item:hover {
    background: #252525;
    border-color: #666;
    transform: translateY(-1px);
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #555;
    margin-right: 15px;
    object-fit: cover;
    background: #333;
}

.item-icon.error {
    background: #333 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') center/contain no-repeat;
}

.item-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.item-name {
    font-weight: 600;
    color: #f0f0f0;
    font-size: 1.1em;
    min-width: 230px;
}

.item-player {
    color: #ccc;
    font-size: 0.95em;
    min-width: 190px;
}

.item-gold {
    color: #ffd700;
    font-weight: 600;
    font-size: 1em;
    min-width: 120px;
}

.item-gold::after {
    content: " gold";
    color: #ccc;
    font-weight: normal;
    font-size: 0.9em;
}

.item-link {
    background: linear-gradient(135deg, #007acc, #0056b3);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-link:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.no-items {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px 20px;
    background: #1a1a1a;
    border: 1px dashed #555;
    border-radius: 8px;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #ccc;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #007acc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 768px) {
    .import-section {
        padding: 15px;
        max-width: 95%;
    }
    
    .loot-section {
        max-width: 95%;
    }
    
    .import-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .import-btn, .clear-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 1.8em;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .loot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .item-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .item-name,
    .item-player,
    .item-gold {
        min-width: auto;
        width: 100%;
    }
    
    .item-link {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .loot-section {
        padding: 15px;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .item-icon {
        width: 50px;
        height: 50px;
    }
    
    .loot-item {
        padding: 12px;
    }
} 