﻿:root {
    --dobble-red: #e63946;
    --dobble-dark: #1d3557;
    --dobble-blue: #457b9d;
    --dobble-light: #f1faee;
    --dobble-accent: #a8dadc;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--dobble-light) 0%, #fff 50%, var(--dobble-accent) 100%);
    min-height: 100vh;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
    font-weight: 700;
    color: var(--dobble-red) !important;
}

a {
    color: var(--dobble-blue);
}

.btn-primary {
    color: #fff;
    background-color: var(--dobble-red);
    border-color: var(--dobble-red);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #c1121f;
    border-color: #c1121f;
}

.btn-primary:disabled {
    background-color: #e6737a;
    border-color: #e6737a;
}

.btn-outline-primary {
    color: var(--dobble-red);
    border-color: var(--dobble-red);
}

.btn-outline-primary:hover {
    background-color: var(--dobble-red);
    border-color: var(--dobble-red);
    color: #fff;
}

/* Dobble Lobby - Create & Join Game */

.game-lobby {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-lobby-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.game-lobby-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dobble-dark);
    margin-bottom: 0.5rem;
}

.game-lobby-header h1 span {
    color: var(--dobble-red);
}

.game-lobby-header p {
    color: var(--dobble-blue);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.game-lobby-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.game-card {
    flex: 1 1 300px;
    max-width: 420px;
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(29, 53, 87, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeInUp 0.5s ease both;
}

.game-card:nth-child(2) {
    animation-delay: 0.15s;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(29, 53, 87, 0.18);
}

.game-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.game-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dobble-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--dobble-red);
}

.game-card .form-group {
    margin-bottom: 1.25rem;
}

.game-card label.control-label {
    font-weight: 600;
    color: var(--dobble-dark);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.game-card .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card .form-control:focus {
    border-color: var(--dobble-blue);
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.2);
}

.game-card .btn {
    width: 100%;
    padding: 0.7rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
}

.game-card .btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.game-card .btn-loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.game-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dobble-blue);
    align-self: center;
}

.game-card .alert {
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
}

.game-card .alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Game section (after create/join) */
#gameSection {
    animation: fadeInUp 0.4s ease both;
}

#gameIdInfo h3 {
    color: var(--dobble-dark);
    font-weight: 700;
}

#gameIdInfo h3 a {
    color: var(--dobble-red);
    text-decoration: none;
}

#gameIdInfo h3 a:hover {
    text-decoration: underline;
}

#pseudos {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin: 1rem 0;
}

#pseudos h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dobble-dark);
    margin-bottom: 0.25rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile: stack columns on small screens */
@media (max-width: 767px) {
    .game-lobby-grid {
        flex-direction: column;
        align-items: center;
    }

    .game-card {
        max-width: 100%;
        width: 100%;
        flex: none;
    }

    .game-divider {
        width: 100%;
        padding: 0.5rem 0;
    }

    .game-divider::before,
    .game-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #ddd;
        margin: 0 1rem;
    }
}

/* Legacy overrides */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: var(--dobble-red);
    border-color: var(--dobble-red);
}

.cloth {
    z-index: 1;
}

#decounter {
    font-size: 95vh;
    font-family: Calibri, 'Trebuchet MS', sans-serif, 'Gill Sans', 'Gill Sans MT';
    font-weight: bold;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}
