body {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%),
                radial-gradient(circle at 50% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 50%);
    background-blend-mode: overlay;
    position: relative;
    padding-bottom: 2rem;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg,
        rgba(0, 0, 0, 0.05) 0px,
        rgba(0, 0, 0, 0.05) 2px,
        transparent 2px,
        transparent 8px
    );
    pointer-events: none;
    z-index: 0;
}

.cards-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: nowrap;
    margin: 10px auto;
    overflow-x: auto;
    padding: 5px 0;
    max-width: 530px;
    width: 100%;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    height: 120px;
    transition: all 0.3s ease;
}

.container.mt-5 .row.saved .card-wrapper {
    height: 75px;
}

.saved-card {
    pointer-events: none;
}

.small-card {
    background: white;
}

.small-card {
    width: 50px;
    height: 70px;
    border-radius: 5px;
    background: white;
    margin: 3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.empty-card {
    background: #f0f0f0;
    border: 1px solid #ddd;
}


.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-btn {
    width: 100%;
    min-width: 50px;
    padding: 3px;
    font-size: 11px;
}

.card-wrapper {
    width: 50px;
}

.cards-row {
    gap: 5px;
    padding: 5px 0;
}

.feature-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card {
    margin: 0;
    border-radius: 15px;
    background: #0c5a2c;
    border: 8px solid #2c1810;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.playing-card {
    width: 160px;
    height: 224px;
    position: relative;
    margin: 10px auto;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    perspective: 1500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.playing-card.flipped {
    transform: rotateY(180deg) translateZ(30px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.playing-card.rotate360 {
    transform: rotateY(540deg) translateZ(30px) scale(1.05);
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-face {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.playing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@keyframes cardFloat {
    0%, 100% { transform: translateZ(0); }
    50% { transform: translateZ(10px); }
}

.playing-card {
    pointer-events: none;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-back {
    background: linear-gradient(45deg, #1a1a1a 25%, #2a2a2a 25%, #2a2a2a 50%, #1a1a1a 50%, #1a1a1a 75%, #2a2a2a 75%, #2a2a2a 100%);
    background-size: 20px 20px;
}

.card-front {
    transform: rotateY(180deg);
}

.card-symbol {
    font-size: 100px;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
}

.card-value.bottom {
    bottom: 10px;
    right: 10px;
    left: auto;
    transform: rotate(180deg);
}

.red {
    color: #ff0000;
}

.black {
    color: #000000;
}

.card-symbol {
    font-size: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.card-corner {
    position: absolute;
    font-size: 24px;
    color: white;
}

.top-left {
    top: 10px;
    left: 10px;
}

.bottom-right {
    bottom: 10px;
    right: 10px;
    transform: rotate(180deg);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
}

.action-btn {
    width: 100px;
    padding: 0.5rem 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-btn:disabled,
#analyzeBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
    transform: none;
    box-shadow: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#saveCombinationBtn {
    display: block;
    margin: 0 auto;
    max-width: 300px;
    transition: all 0.3s ease;
}

#saveCombinationBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#savedMessage {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.btn-danger {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: none;
    max-width: 300px;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border: none;
}

.row.mt-3 {
    margin-top: 0!important;
}

.col-md-8 {
    margin-bottom: 10px !important;
}

.container.mt-5 {
    margin-top: 0!important;
    margin-bottom: 0!important;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container.mt-5 > .row {
    margin: 0!important;
    padding: 0!important;
}

.row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.small-card {
    width: 45px;
    height: 63px;
    font-size: 20px;
}

/* Auth page nav tabs styling */
.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: #fff !important;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom: 2px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.nav-tabs .nav-link.active {
    background: rgba(255, 68, 68, 0.2) !important;
    border-bottom: 2px solid #ff4444 !important;
    color: #fff !important;
}

.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navbar logo styling */
.navbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

/* Auth page logo styling */
.auth-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .display-4 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .lead {
        font-size: 1rem;
    }

    .display-1 {
        font-size: 3rem;
    }

    .feature-box {
        padding: 15px;
        backdrop-filter: blur(10px);
    }

    .container {
        padding: 0 15px;
    }

    h3 {
        font-size: 1.5rem;
    }

    .card {
        margin: 0;
        border-radius: 15px;
        background: #0c5a2c;
        border: 8px solid #2c1810;
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
        position: relative;
    }

    .card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23155d2d' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.3;
        pointer-events: none;
        border-radius: 7px;
    }

    .playing-card {
        width: 180px;
        height: 252px;
        margin: 15px auto;
    }

    .action-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

    .navbar {
        padding: 1.2rem 0;
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(56, 189, 248, 0.25);
        box-shadow: 0 4px 15px rgba(15, 23, 42, 0.6);
    }

    .navbar-brand {
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .dropdown-toggle {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }

    .dropdown-toggle::after {
        margin-left: 6px;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.9rem;
    }

    .dropdown-item img {
        width: 16px;
    }

    #currentFlag {
        width: 20px;
    }

    .language-dropdown .dropdown-toggle {
        padding: 0.25rem 0.5rem;
        min-width: auto;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    .language-dropdown .dropdown-toggle::after {
        display: none;
    }

    .language-dropdown .dropdown-toggle:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    }

    body {
        background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    }
}

.dropdown {
    position: relative;
    z-index: 10000;
}

.dropdown-menu {
    z-index: 10001 !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    min-width: 120px;
}

@media (max-width: 768px) {
    .dropdown-menu {
        left: auto !important;
        right: 0 !important;
        transform: translateX(0) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.navbar {
    position: relative;
    z-index: 9999;
}

.cards-row {
    position: relative;
    z-index: 1;
}

.locked-card {
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.locked-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.locked-card + .btn,
.locked-card + .btn + .btn {
    pointer-events: none;
    opacity: 0.3;
}

.small-card {
    width: 50px;
    height: 70px;
    border: 2px solid #333;
    border-radius: 5px;
    background: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 5px 0;
}

.empty-card {
    background: #f8f9fa;
    border-color: #dee2e6;
}