/* ==========================================================================
   CYRUS MINE (کوروش ماین) — Dark Gaming Design System & TrexMine Smooth Animations
   RTL Persian + Latin Gaming Typography | Emerald (#10b981) & Royal Gold (#f59e0b)
   ========================================================================== */

:root {
    --bg-base: #07090e;
    --bg-elevated: #0d111a;
    --bg-card: rgba(15, 21, 33, 0.85);
    --bg-card-hover: rgba(20, 28, 44, 0.95);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-emerald: rgba(16, 185, 129, 0.38);
    --border-gold: rgba(245, 158, 11, 0.38);
    --emerald: #10b981;
    --emerald-bright: #34d399;
    --emerald-glow: rgba(16, 185, 129, 0.22);
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.2);
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text-main: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-base);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.09) 0%, transparent 38%),
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 35%),
        linear-gradient(180deg, #07090e 0%, #0a0e17 100%);
    color: var(--text-main);
    font-family: 'Vazirmatn', 'IRANSansX', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    direction: rtl;
}

.font-latin {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    direction: ltr;
    display: inline-block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s var(--transition-smooth), border-color 0.25s var(--transition-smooth), transform 0.25s var(--transition-smooth);
}

/* --------------------------------------------------------------------------
   Smooth Gaming Animations (Inspired by TrexMine & Modern MC Networks)
   -------------------------------------------------------------------------- */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(1.5deg); }
}

@keyframes pulseEmerald {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

@keyframes shimmerBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-float {
    animation: floatSlow 5.5s ease-in-out infinite;
}

.reveal-item {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s var(--transition-smooth), transform 0.65s var(--transition-smooth);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Layout Containers & Grid
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4.5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-emerald);
    color: var(--emerald-bright);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.section-title {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-emblem {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(245, 158, 11, 0.18));
    border: 1px solid var(--border-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.brand-title {
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--emerald-bright);
    letter-spacing: 0.08em;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
}

.nav-link {
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.93rem;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 25%;
    left: 25%;
    height: 2px;
    background: var(--emerald);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-emerald);
    color: var(--emerald-bright);
    font-size: 0.86rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.35rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s var(--transition-smooth);
    text-align: center;
    white-space: nowrap;
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #04130d;
    box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(16, 185, 129, 0.65);
    filter: brightness(1.06);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #160c02;
    box-shadow: 0 8px 24px -6px rgba(245, 158, 11, 0.4);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(245, 158, 11, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--emerald);
    background: rgba(16, 185, 129, 0.09);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.84rem;
}

.btn-lg {
    padding: 0.9rem 1.85rem;
    font-size: 1.02rem;
}

/* --------------------------------------------------------------------------
   Hero Section & IP Copy Box
   -------------------------------------------------------------------------- */
.hero-section {
    padding: 4.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.1rem, 4.2vw, 3.35rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.2rem;
    color: #ffffff;
}

.hero-title .text-emerald {
    color: var(--emerald-bright);
    text-shadow: 0 0 32px rgba(16, 185, 129, 0.35);
}

.hero-title .text-gold {
    color: var(--gold-bright);
}

.hero-desc {
    font-size: 1.08rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 620px;
}

.ip-copy-box {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(13, 18, 28, 0.92);
    border: 1px solid var(--border-emerald);
    padding: 0.65rem 0.75rem 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 14px 35px -10px rgba(16, 185, 129, 0.22);
    transition: transform 0.25s var(--transition-smooth), border-color 0.25s var(--transition-smooth);
}

.ip-copy-box:hover {
    transform: translateY(-2px);
    border-color: var(--emerald-bright);
}

.ip-address {
    font-family: 'Inter', monospace;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    direction: ltr;
}

/* --------------------------------------------------------------------------
   Gaming Cards & Rank Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.65rem;
    backdrop-filter: blur(12px);
    transition: transform 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(16, 185, 129, 0.14);
}

.card-gold:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(245, 158, 11, 0.18);
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-gold {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-muted {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--emerald);
    animation: pulseEmerald 2s infinite;
}

.status-dot.offline {
    background: var(--gold);
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(9, 13, 22, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.92rem;
}

.data-table th {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* --------------------------------------------------------------------------
   Toasts & Alerts
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
}

.toast {
    background: rgba(13, 18, 30, 0.96);
    border: 1px solid var(--border-emerald);
    border-right: 4px solid var(--emerald);
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-sm);
    color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65);
    animation: fadeInUp 0.35s var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.toast.toast-danger { border-color: rgba(239, 68, 68, 0.45); border-right-color: var(--danger); }
.toast.toast-warning { border-color: rgba(245, 158, 11, 0.45); border-right-color: var(--gold); }

/* --------------------------------------------------------------------------
   User & Admin Panel Sidebar Layouts
   -------------------------------------------------------------------------- */
.panel-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 1.75rem;
    align-items: start;
    padding: 2.25rem 0 4rem;
}

.panel-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: sticky;
    top: 96px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.95rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(16, 185, 129, 0.14);
    color: var(--emerald-bright);
    border-right: 3px solid var(--emerald);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: auto;
    background: #05070b;
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-desc {
        margin-right: auto;
        margin-left: auto;
    }
    .panel-layout {
        grid-template-columns: 1fr;
    }
    .panel-sidebar {
        position: static;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 78px;
        right: 0;
        left: 0;
        background: #0a0e17;
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 1rem;
    }
    .nav-links.is-open {
        display: flex;
    }
    .mobile-menu-btn {
        display: inline-flex;
    }
}
