/* ============================================
   NEW LIFE SMP SHOP - Matching Design System
   ============================================ */

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

/* Design Tokens - Exact Match */
:root {
    /* Primary: Deep Forest Green */
    --primary: #4a7c59;
    --primary-dark: #3d6549;
    --primary-light: #6b9b7a;
    --primary-subtle: rgba(74, 124, 89, 0.12);
    
    /* Secondary: Warm Amber Gold */
    --secondary: #c9a227;
    --secondary-dark: #a88a1f;
    --secondary-light: #dbb94d;
    
    /* Accent: Soft Sage */
    --accent: #8fbc8f;
    --accent-subtle: rgba(143, 188, 143, 0.15);
    
    /* Backgrounds - Warm charcoal tones */
    --bg-dark: #1a1d21;
    --bg-darker: #121417;
    --bg-card: #22262b;
    --bg-card-hover: #2d3238;
    --bg-elevated: #282c32;
    
    /* Text - Warm whites and grays */
    --text-primary: #f5f3f0;
    --text-secondary: #a8a4a0;
    --text-muted: #6d6a66;
    
    /* Borders */
    --border-color: rgba(168, 164, 160, 0.12);
    --border-light: rgba(245, 243, 240, 0.08);
    --border-accent: rgba(74, 124, 89, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(74, 124, 89, 0.2);
    --shadow-gold: 0 0 20px rgba(201, 162, 39, 0.15);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 76px;
    
    /* Status Colors */
    --success: #81b29a;
    --warning: #e07a5f;
    --danger: #ef5350;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary);
}

/* Selection styling */
::selection {
    background: var(--primary-subtle);
    color: var(--text-primary);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(18, 20, 23, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar .container {
    max-width: var(--max-width);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
}

.brand span {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.925rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-light);
    background: var(--bg-card);
}

.nav-links a.active {
    color: var(--primary-light);
    background: var(--primary-subtle);
}

#userNav {
    display: flex;
    align-items: center;
}

/* Login Button */
.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 24px;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.35);
    transition: all var(--transition-normal);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 124, 89, 0.45);
    color: white;
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Main Content */
.main-content {
    padding-top: calc(var(--nav-height) + 40px);
    min-height: 100vh;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    text-align: center;
    padding: 60px 24px 80px;
    background: 
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(74, 124, 89, 0.18), transparent),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(201, 162, 39, 0.08), transparent),
        radial-gradient(ellipse 60% 50% at 15% 80%, rgba(143, 188, 143, 0.06), transparent);
    position: relative;
}

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: 28px;
    border-radius: var(--radius-md);
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(145deg, var(--text-primary) 0%, var(--accent) 50%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Page Title */
.page-title {
    font-size: clamp(1.625rem, 3vw, 2.5rem);
    margin-bottom: 32px;
    text-align: center;
    background: linear-gradient(145deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 124, 89, 0.45);
    color: white;
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 100%);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.btn-gold {
    background: linear-gradient(145deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--bg-darker);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
    font-weight: 700;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.5);
    color: var(--bg-darker);
}

/* ============================================
   SHOP GRID
   ============================================ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.shop-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
}

.shop-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.item-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(145deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--bg-darker);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-name {
    font-size: 1.35rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.item-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.item-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.item-features li {
    position: relative;
    padding: 10px 0 10px 28px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.item-features li:last-child {
    border-bottom: none;
}

.item-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.item-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.buy-btn {
    width: 100%;
}

/* ============================================
   DONATE PAGE
   ============================================ */
.donate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.donate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.donate-card h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.donate-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1rem;
    line-height: 1.7;
}

.donate-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    transition: all var(--transition-fast);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-subtle);
}

.input-group .currency {
    color: var(--primary-light);
    margin-right: 10px;
    font-size: 1.35rem;
    font-weight: 700;
}

.input-group input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
    width: 100%;
    outline: none;
    font-family: inherit;
}

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

/* ============================================
   PROFILE DROPDOWN
   ============================================ */
.profile-dropdown {
    position: relative;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 100px;
    transition: all var(--transition-fast);
}

.profile-button:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    min-width: 280px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-light);
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.dropdown-user-details h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.dropdown-user-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropdown-section {
    padding: 16px;
}

.dropdown-section h5 {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.purchase-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.purchase-item {
    padding: 12px 14px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.purchase-item h6 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.purchase-item p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.no-purchases {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dropdown-actions {
    padding: 8px;
    border-top: 1px solid var(--border-light);
}

.dropdown-actions a {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.925rem;
    font-weight: 500;
}

.dropdown-actions a:hover {
    background: var(--bg-card-hover);
    color: var(--primary-light);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: 
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(74, 124, 89, 0.12), transparent),
        radial-gradient(ellipse 40% 30% at 80% 20%, rgba(201, 162, 39, 0.06), transparent);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.login-card h1 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.75rem;
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1rem;
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(145deg, #5865F2 0%, #4752c4 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
}

.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
    color: white;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-header {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.admin-header h1 {
    color: var(--primary-light);
    margin-bottom: 8px;
    font-size: 1.75rem;
}

.admin-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.admin-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--primary-light);
    background: var(--primary-subtle);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.product-list {
    display: grid;
    gap: 12px;
}

.product-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.product-item:hover {
    border-color: var(--border-accent);
}

.product-info h3 {
    margin-bottom: 6px;
    font-size: 1rem;
    color: var(--text-primary);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.form-grid {
    display: grid;
    gap: 20px;
    max-width: 500px;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    background: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-subtle);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: linear-gradient(145deg, var(--danger) 0%, #d32f2f 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(145deg, #ff6b6b 0%, var(--danger) 100%);
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-label {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 5px;
    border: 2px solid var(--bg-darker);
}

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

* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-card-hover) var(--bg-darker);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0 16px;
    }
    
    .nav-links {
        gap: 4px;
    }
    
    .nav-links a {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .brand span {
        display: none;
    }
    
    .hero-section {
        padding: 40px 16px 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .donate-card {
        padding: 32px 24px;
    }
    
    .admin-tabs {
        gap: 4px;
    }
    
    .admin-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-actions {
        width: 100%;
    }
    
    .product-actions .btn {
        flex: 1;
    }
    
    .login-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .shop-item {
        padding: 24px;
    }
    
    .item-price {
        font-size: 1.75rem;
    }
}
