/* ===================================================
   VideoGamesLibrary – Dark Gaming Theme
   ASP.NET MVC 5 | Site.css
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #0d0f14;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; transition: color .2s; }

/* ── NAVBAR ───────────────────────────────────────── */
.navbar {
    background: #141720;
    border-bottom: 1px solid #1e2333;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7c6df0;
    letter-spacing: -.3px;
}
.nav-brand:hover { color: #9d8ff5; }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: #a0aec0;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.nav-link:hover { background: #1e2333; color: #e2e8f0; }

.nav-link-accent {
    background: linear-gradient(135deg, #7c6df0, #5a4fcf);
    color: #fff !important;
    padding: 0.45rem 1rem;
    border-radius: 6px;
}
.nav-link-accent:hover { opacity: 0.88; color: #fff; }

.nav-link-danger { color: #fc8181 !important; }
.nav-link-danger:hover { background: rgba(252,129,129,.12); color: #fc8181; }

.nav-user {
    font-size: 0.88rem;
    color: #68d391;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    background: rgba(104,211,145,.1);
    border-radius: 20px;
}

.nav-link-admin {
    background: rgba(236, 201, 75, 0.1);
    color: #ecc94b !important;
    border: 1px solid rgba(236, 201, 75, 0.2);
}
.nav-link-admin:hover {
    background: rgba(236, 201, 75, 0.2);
    color: #f6e05e !important;
}

/* ── MAIN CONTENT ─────────────────────────────────── */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1.2rem;
    background: #141720;
    border-top: 1px solid #1e2333;
    color: #4a5568;
    font-size: 0.82rem;
}

/* ── PAGE HEADER ──────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.page-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c6df0, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
.page-subtitle {
    color: #718096;
    font-size: 1rem;
}

/* ── GAMES TABLE ──────────────────────────────────── */
.table-container {
    background: #141720;
    border: 1px solid #1e2333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
}

.games-table {
    width: 100%;
    border-collapse: collapse;
}

.games-table thead tr {
    background: linear-gradient(135deg, #1a1d2e, #242840);
    border-bottom: 2px solid #7c6df0;
}

.games-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.games-table tbody tr {
    border-bottom: 1px solid #1e2333;
    transition: background .15s;
}
.games-table tbody tr:last-child { border-bottom: none; }
.games-table tbody tr:hover { background: #1a1d2e; }

.games-table td {
    padding: 0.95rem 1.2rem;
    font-size: 0.92rem;
    color: #cbd5e0;
}

.game-title {
    font-weight: 600;
    color: #e2e8f0 !important;
}

.genre-badge {
    background: rgba(124,109,240,.18);
    color: #9d8ff5;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(124,109,240,.3);
}

.table-footer {
    padding: 0.85rem 1.2rem;
    border-top: 1px solid #1e2333;
    font-size: 0.85rem;
    color: #718096;
    background: #0d0f14;
}

/* ── EMPTY STATE ──────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #4a5568;
}
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }

/* ── AUTH FORMS ───────────────────────────────────── */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 130px);
    padding: 2rem 1rem;
}

.auth-card {
    background: #141720;
    border: 1px solid #1e2333;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-icon { font-size: 2.8rem; margin-bottom: 0.6rem; }
.auth-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.3rem;
}
.auth-subtitle { color: #718096; font-size: 0.92rem; }

/* ── FORM ELEMENTS ────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 1.2rem; }

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

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #a0aec0;
    letter-spacing: .3px;
}

.form-control {
    background: #0d0f14;
    border: 1.5px solid #2d3748;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: #7c6df0;
    box-shadow: 0 0 0 3px rgba(124,109,240,.2);
}
.form-control::placeholder { color: #4a5568; }

/* ── VALIDATION MESSAGES ──────────────────────────── */
.field-error {
    color: #fc8181;
    font-size: 0.82rem;
    font-weight: 500;
}

.validation-summary {
    background: rgba(252,129,129,.1);
    border: 1px solid rgba(252,129,129,.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fc8181;
    font-size: 0.88rem;
}

/* ── ALERTS ───────────────────────────────────────── */
.alert-success {
    background: rgba(104,211,145,.1);
    border: 1px solid rgba(104,211,145,.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #68d391;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}
.alert-error {
    background: rgba(252,129,129,.1);
    border: 1px solid rgba(252,129,129,.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fc8181;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* ── AUTH BUTTON ──────────────────────────────────── */
.btn-auth {
    background: linear-gradient(135deg, #7c6df0, #5a4fcf);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    margin-top: 0.5rem;
    width: 100%;
    letter-spacing: .3px;
    text-align: center;
}
.btn-auth:hover { opacity: 0.88; }
.btn-auth:active { transform: scale(0.98); }

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: #718096;
}
.auth-link {
    color: #7c6df0;
    font-weight: 600;
    margin-left: 0.3rem;
}
.auth-link:hover { color: #9d8ff5; text-decoration: underline; }

/* ── ACTION BUTTONS ────────────────────────────────── */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none !important;
}

.btn-action.edit {
    background: rgba(66, 153, 225, 0.15);
    color: #63b3ed;
    border: 1px solid rgba(66, 153, 225, 0.3);
}
.btn-action.edit:hover {
    background: #4299e1;
    color: white;
    box-shadow: 0 0 15px rgba(66, 153, 225, 0.4);
}
.btn-action.edit::before { content: "✏️"; font-size: 0.85rem; }

.btn-action.delete {
    background: rgba(245, 101, 101, 0.15);
    color: #fc8181;
    border: 1px solid rgba(245, 101, 101, 0.3);
}
.btn-action.delete:hover {
    background: #f56565;
    color: white;
    box-shadow: 0 0 15px rgba(245, 101, 101, 0.4);
}
.btn-action.delete::before { content: "🗑️"; font-size: 0.85rem; }

.btn-action.view {
    background: rgba(104, 211, 145, 0.15);
    color: #68d391;
    border: 1px solid rgba(104, 211, 145, 0.3);
}
.btn-action.view:hover {
    background: #48bb78;
    color: white;
    box-shadow: 0 0 15px rgba(104, 211, 145, 0.4);
}
.btn-action.view::before { content: "👁️"; font-size: 0.85rem; }

/* ── RESPONSIVENESS ─────────────────────────────────── */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .nav-link { font-size: 0.8rem; padding: 6px 10px; }
    
    .page-title { font-size: 1.8rem; }
    
    /* Table Responsiveness */
    .table-container {
        overflow-x: auto;
    }
    .games-table th, .games-table td {
        padding: 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Grid Responsiveness */
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .card-image-wrap { height: 300px; }
    
    /* Form Responsiveness */
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    
    /* Details Page Mobile */
    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-cover { width: 220px; }
    .detail-title { font-size: 2.2rem; }
    .purchase-area { flex-direction: column; width: 100%; gap: 15px; }
    .details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .main-content { padding: 1.5rem 1rem; }
    .nav-links { gap: 5px; }
    .nav-link { padding: 5px 8px; }
    .auth-card { padding: 1.5rem; }
}
