/* Grundlegendes Design */
:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --neon-green: #22c55e;
    --neon-blue: #3b82f6;
    --crypto-orange: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Navbar Styling */
.navbar {
    width: 100%;
    background: #1e293b;
    border-bottom: 2px solid #334155;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.logo span {
    color: var(--crypto-orange);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--neon-blue);
}

.logout-link {
    color: #ef4444 !important; /* Rot für Logout */
}

/* Haupt-Container Zentrierung */
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Alle Tab-Inhalte standardmäßig mit Animation */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Das Mining-Grid (Nebeneinander) */
.mining-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Aktiven Link in der Navbar hervorheben */
.nav-links a.active {
    color: var(--neon-blue);
    border-bottom: 2px solid var(--neon-blue);
    padding-bottom: 5px;
}

/* Ranking Bereich */
#ranking-area {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.ranking-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.ranking-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-number {
    font-weight: 800;
    width: 50px;
}

/* Die Top 3 hervorheben */
.rank-1 { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.player-name {
    font-weight: 600;
}

.player-balance {
    text-align: right;
    color: var(--neon-green);
    font-family: monospace;
    font-size: 1.1rem;
}

/* Die Stats-Leiste direkt darunter */
.stats-bar {
    background: #0f172a;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item .label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.stat-item .value {
    color: var(--neon-green);
    font-weight: 800;
    font-size: 1.2rem;
}

.stat-item .value-gems {
    color: #a855f7; /* Lila für Gems */
    font-weight: 800;
}

/* Header & Stats */
.header {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--crypto-orange), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats {
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
    margin-top: 10px;
}

/* Spiel-Container */
.mining-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    padding: 40px 0;
}

/* Coin Cards */
.coin-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.coin-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.5);
}

.coin-card h2 {
    margin-top: 0;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.locked {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Buttons */
button {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    pointer-events: auto;
    position: relative;
    z-index: 2;	
}

.main-btn {
    background: linear-gradient(135deg, var(--neon-blue), #2563eb);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.main-btn:active {
    transform: scale(0.98);
}

.upgrade-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* Manager Bereich */
.manager-section {
    width: 90%;
    max-width: 1000px;
    margin-top: 20px;
}

.manager-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--crypto-orange);
    text-align: center;
}

.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.management-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth-spezifische Hintergründe */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    margin: 0;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px); /* Glass-Effekt */
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin: 10px 0;
    color: #f8fafc;
}

.auth-header p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Eingabefelder */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6; /* Neon Blau */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.auth-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 700;
}