﻿body{
background-color: lightskyblue;
/*    background-image: url('../img/s1.png');*/
}

.head{
    background-image: url('../img/head.png');
    height: 300px;
    background-size: cover;
    background-position: top center;
    text-align: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px black;
    padding: 20px;
}

#card-master-section{
   background-color: GrayText;
}

.empty-section {
    background-color: lightskyblue;
    min-height: 300px;
    padding: 50px;
}

.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin: 0;
}

.footer p {
    margin: 0;
    font-size: 16px;
}

.card{
    width: 150px;
    height: 200px;
    border-radius: 5px;
    border-color: black;
    box-shadow: black 2px 2px 5px;
    flex-shrink: 0;
    order: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.card:hover{
    transform: scale(1.10);
    transition: transform 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.9);
}

.card-counter{
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    user-select: none;
}

.count {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Special card wrapper positioning */
.card-wrapper-special {
    grid-column: 7;
    margin-left: 20px;
}

/* Special cards styling */
.card-special {
    box-shadow: black 2px 2px 5px;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    color: white;
    font-weight: bold;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

.card-special:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
}

.card-grid-6 {
    display: grid;
    grid-template-columns: repeat(7, 150px);
    gap: 30px;
    justify-content: center;
    margin-left: -20px; /* Offset to compensate for special card right shift */
}

.series-selector-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(7 * 150px + 6 * 30px + 20px); /* Match card grid width + special card offset */
    margin: 0 auto;
}

.series-selector-inner {
    display: flex;
    align-items: center;
}

#series-selector {
    width: 300px;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

#login-btn {
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hidden until auth check completes */
}

#login-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: #007bff;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    right: 5px;
    display: none; /* Hidden until auth check completes */
}

.username-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.username-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: #007bff;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.username-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.dropdown-menu-custom.show {
    display: block;
}

.dropdown-item-custom {
    width: 100%;
    padding: 10px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item-custom:hover {
    background-color: #f8f9fa;
}

.dropdown-item-custom.logout-btn {
    color: #dc3545;
    background-color: #fdd;
}

.dropdown-item-custom.logout-btn:hover {
    background-color: #fcc;
    color: #c82333;
}







/* Responsive: smaller screens */
@media (max-width: 1350px) {
    .card-grid-6 {
        grid-template-columns: repeat(4, 150px);
        margin-left: 0; /* Reset offset on smaller screens */
    }
    .series-selector-wrapper {
        width: calc(4 * 150px + 3 * 30px);
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .card-grid-6 {
        grid-template-columns: repeat(3, 150px);
        margin-left: 0; /* Reset offset on smaller screens */
    }
    .series-selector-wrapper {
        width: calc(3 * 150px + 2 * 30px);
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .user-dropdown {
        right: 0;
    }

    .card-grid-6 {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-left: 0; /* Reset offset on smaller screens */
    }

    .card {
        width: 90%;
        max-width: 300px;
        height: 400px;
        margin: 0 auto;
    }

    .card-counter {
        width: 90%;
        max-width: 300px;
        margin: 10px auto 0;
    }

    .series-selector-wrapper {
        width: 100%;
        max-width: 400px;
        padding: 0 20px;
        flex-direction: column-reverse; /* Auth section on top, series below */
        gap: 15px;
        align-items: stretch;
    }

    .auth-section {
        justify-content: center;
    }

    .series-selector-inner {
        width: 100%;
    }

    #series-selector {
        width: 100%;
    }
}

/* Remove special positioning on smaller screens */
@media (max-width: 1350px) {
    .card-wrapper-special {
        grid-column: auto;
        margin-left: 0;
        order: 1;
    }
}