/* Reset & Base */
:root {
    --bg-body: #121417;
    --bg-card: #1c1f24;
    --bg-input: #121417;
    --primary-color: #00e676;
    --primary-hover: #00c853;
    --text-white: #e6e6e6;
    --text-gray: #9ca3af;
    --border-color: #2a2e35;
    --radius-sm: 6px;
    --radius-md: 10px;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 10px rgba(0, 230, 118, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-body); color: var(--text-white); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; padding-top: 100px; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

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

/* Header - Fixed & Flex */
header {
    background: rgba(28, 31, 36, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 80px;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
}

header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Use internal padding */
}

.logo { 
    flex: 0 0 auto;
    font-size: 1.6rem; 
    font-weight: 700; 
    color: #fff; 
    display: flex; 
    align-items: center; 
}
.logo span { color: var(--primary-color); }

nav { 
    flex: 1; 
    display: flex; 
    justify-content: center; 
    padding: 0 20px;
}
.nav-links { 
    display: flex; 
    gap: 40px; 
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a { 
    color: var(--text-gray); 
    font-size: 1rem; 
    font-weight: 500; 
    white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }

.auth-buttons { 
    flex: 0 0 auto;
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; border: none; cursor: pointer; transition: 0.2s; font-size: 0.95rem; }
.btn-primary { background: var(--primary-color); color: #000; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--border-color); color: var(--text-gray); background: transparent; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 0.85rem; }

/* Forms */
.form-control { background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-white); border-radius: var(--radius-sm); padding: 10px 15px; width: 100%; display: block; }
.form-control:focus { border-color: var(--primary-color); outline: none; }

/* Filter Bar (Market Page) */
.filter-bar { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 15px 25px; margin-bottom: 40px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.filter-item { position: relative; }
.filter-item select { background: #000; border: 1px solid var(--border-color); color: var(--text-white); padding: 10px 35px 10px 15px; border-radius: var(--radius-sm); outline: none; appearance: none; min-width: 140px; cursor: pointer; }
.filter-item::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-gray); pointer-events: none; }
.filter-btn { height: 42px; padding: 0 30px; }
.reset-link { color: var(--text-gray); font-size: 0.9rem; margin-left: 10px; }
.reset-link:hover { text-decoration: underline; color: #fff; }

/* Cards & Grid */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.account-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; transition: 0.3s; position: relative; display: flex; flex-direction: column; }
.account-card:hover { border-color: var(--primary-color); transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.card-img { height: 160px; background: #252a30; display: flex; align-items: center; justify-content: center; color: #444; }
.card-body { padding: 15px; flex: 1; }
.card-title { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; color: #fff; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.85rem; color: var(--text-gray); }
.stat-item { display: flex; align-items: center; gap: 6px; }
.stat-item i { color: #666; }
.coin-val { color: #ffd700; font-weight: bold; }
.card-footer { padding: 15px; background: rgba(0,0,0,0.2); border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.price { color: var(--primary-color); font-weight: 700; font-size: 1.1rem; }
.btn-rent { background: var(--primary-color); color: #000; padding: 6px 16px; border-radius: 4px; font-weight: 700; font-size: 0.9rem; }
.btn-rent:hover { background: var(--primary-hover); }
.rank-badge { position: absolute; top: 12px; right: 12px; padding: 4px 8px; font-size: 0.75rem; border-radius: 4px; font-weight: bold; z-index: 10; }

/* Hero Section (Index) */
.hero {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, rgba(18, 20, 23, 0) 100%);
    padding: 80px 0 60px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}
.hero h1 { font-size: 3.5rem; margin-bottom: 15px; color: #fff; font-weight: 800; letter-spacing: -1px; }
.hero h1 span { color: var(--primary-color); }
.hero p { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
    text-align: center;
    color: var(--text-gray);
}
.footer-links { margin-bottom: 20px; }
.footer-links a { margin: 0 15px; color: var(--text-gray); font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary-color); }
.copyright { font-size: 0.85rem; opacity: 0.6; }

/* Profile & Tables */
.profile-container { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding-bottom: 60px; }
.sidebar { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.user-card { padding: 30px 20px; text-align: center; border-bottom: 1px solid var(--border-color); background: #181b20; }
.menu-list a { display: block; padding: 15px 25px; color: var(--text-gray); border-bottom: 1px solid var(--border-color); transition: 0.2s; }
.menu-list a:hover, .menu-list a.active { background: rgba(0, 230, 118, 0.05); color: var(--primary-color); border-left: 3px solid var(--primary-color); }
.main-content { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 30px; min-height: 500px; }
.section-title { font-size: 1.5rem; margin-bottom: 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background: #181b20; color: var(--text-gray); font-weight: 600; }
td { color: var(--text-white); }
.status-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.85rem; display: inline-block; }
.status-verified { background: rgba(0, 230, 118, 0.1); color: var(--primary-color); }
.status-pending { background: rgba(255, 204, 0, 0.1); color: #ffcc00; }
.status-unverified { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; }

/* Checkout */
.checkout-container { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-bottom: 60px; }
.checkout-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 30px; margin-bottom: 30px; }
.checkout-title { font-size: 1.3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; color: #fff; }
.contract-box { background: #15171b; border: 1px solid var(--border-color); padding: 20px; height: 350px; overflow-y: auto; color: #ccc; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.7; border-radius: 4px; }
.contract-box h4 { color: #fff; margin-top: 20px; margin-bottom: 10px; }
.price-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--text-gray); }
.price-row.total { border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 15px; font-size: 1.2rem; color: #fff; font-weight: bold; }
.payment-method { border: 1px solid var(--border-color); padding: 15px; border-radius: var(--radius-sm); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s; }
.payment-method.active, .payment-method:hover { border-color: var(--primary-color); background: rgba(0, 230, 118, 0.05); }

/* Alerts */
.alert { padding: 15px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert-success { background: rgba(0, 230, 118, 0.1); color: var(--primary-color); border: 1px solid rgba(0, 230, 118, 0.3); }
.alert-error { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; border: 1px solid rgba(255, 77, 77, 0.3); }

/* Privacy Policy */
.policy-page { padding: 40px 0; }
.policy-content { background: var(--bg-card); padding: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.policy-content h1 { margin-bottom: 30px; text-align: center; color: #fff; font-size: 2rem; }
.policy-date { text-align: right; color: var(--text-gray); margin-bottom: 30px; font-size: 0.9rem; }
.policy-section { margin-bottom: 30px; }
.policy-section h3 { margin-bottom: 15px; color: #fff; font-size: 1.3rem; border-left: 4px solid var(--primary-color); padding-left: 15px; }
.policy-section p { color: var(--text-gray); margin-bottom: 15px; line-height: 1.7; }
.policy-section ul { list-style: disc; margin-left: 20px; color: var(--text-gray); line-height: 1.7; margin-bottom: 15px; }
.policy-section ul li { margin-bottom: 8px; }
.policy-section strong { color: #e6e6e6; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Hide nav on mobile for now */
    .checkout-container, .profile-container { grid-template-columns: 1fr; }
    header { padding: 0 20px; }
    .policy-content { padding: 25px; }
}
