html {
    overflow-y: scroll !important;
}

:root {
    --bg-main: rgba(25, 28, 35, 0.97);
    --panel-bg: rgba(16, 24, 32, 0.95);
    --border-accent: rgba(15, 255, 213, 0.5);
    --primary-accent: #0fffd5;
    --primary-accent-hover: #0acfb0;
    --text-light: #e0e0e0;
    --text-medium: #ababab;
    --font-main: 'Inter', sans-serif;
    --glass-effect: blur(10px);
    --neon-green: #0fffd5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    background-color: #0b0d10;
    background-image: linear-gradient(180deg, var(--bg-main) 0%, #000000 100%);
    color: var(--text-light);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

#user-info, 
#btn-admin-hub, 
#btn-user-apply {
    display: none;
}

.logo {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("../images/tdc_whitelist_logo.png");
    border-radius: 50%;
    box-shadow: 0 0 25px var(--border-accent);
    margin-top: 20px;
    z-index: 2;
    position: relative;
}

.banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: radial-gradient(circle at center, rgba(15, 255, 213, 0.15) 0%, transparent 70%);
    z-index: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(11, 13, 16, 0.3), var(--dark-bg));
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(15, 255, 213, 0.6);
    margin-bottom: 10px;
    line-height: 1.2;
    padding: 0 20px;
    text-align: center;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: #cccccc;
    font-weight: 300;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 0.625em;
    z-index: 20;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-accent);
}

#username {
    font-weight: 600;
    color: var(--primary-accent);
}

button {
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    outline: none;
}

.auth-button, .admin-panel-button, .checkout-btn {
    background: transparent;
    color: var(--primary-accent);
    border: 1px solid var(--primary-accent);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 0 5px rgba(15, 255, 213, 0.2);
}

.auth-button:hover, .admin-panel-button:hover, .checkout-btn:hover {
    background: var(--primary-accent);
    color: #000;
    box-shadow: 0 0 20px var(--primary-accent);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #555;
    box-shadow: none;
    background: transparent;
}

.checkout-btn:disabled:hover {
    background: transparent;
    color: #555;
    box-shadow: none;
}

/* Applications button standout */
#btn-user-apply {
    background: var(--primary-accent);
    color: #0b0d10;
    box-shadow: 0 0 15px rgba(15, 255, 213, 0.3);
}

#btn-user-apply:hover {
    background: var(--primary-accent-hover);
    box-shadow: 0 0 25px var(--primary-accent);
    transform: translateY(-2px);
}

/* Logout state styling */
#auth-button.logout-btn {
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.2);
}

#auth-button.logout-btn:hover {
    background: #ff4444;
    color: #fff;
    box-shadow: 0 0 20px #ff4444;
}

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    z-index: 5;
}

.product-container > div, .product-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.product-container > div:hover, .product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(15, 255, 213, 0.2);
}

.product-container img, .product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-container h3, .product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 10px 0;
    color: var(--text-light);
    line-height: 1.4;
}

.product-container p, .product-price {
    font-size: 1.3rem;
    color: var(--primary-accent);
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(15, 255, 213, 0.3);
}

.product-container button, .buy-button {
    background: #00ffd5;
    color: #000;
    border: none;
    padding: 12px 0;
    width: 100%;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

.product-container button:hover, .buy-button:hover {
    background: #00d4b1;
    filter: none;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 213, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--primary-accent);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(15, 255, 213, 0.15);
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

#modalImage {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #333;
}

#modalTitle {
    color: var(--primary-accent);
    font-size: 1.8rem;
    text-transform: uppercase;
}

.modal-buttons-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.close-btn {
    background: transparent;
    border: 1px solid #db4437;
    color: #db4437;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
}

.close-btn:hover {
    background: #db4437;
    color: white;
}

.footer {
    margin-top: auto;
    padding: 30px;
    text-align: center;
    border-top: 1px solid #222;
    color: var(--text-medium);
    background: rgba(0,0,0,0.3);
}

.footer a {
    color: var(--primary-accent);
    text-decoration: none;
}

@media screen and (min-width: 769px) {
    .user-info-container {
        position: absolute;
        right: 2em;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        justify-content: flex-end;
    }
}

/* --- User Dropdown Styles --- */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-avatar-trigger {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-accent);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
}

.user-avatar-trigger:hover {
    box-shadow: 0 0 15px var(--primary-accent);
    transform: scale(1.05);
}

.user-dropdown-menu {
    position: absolute;
    top: 65px;
    right: 0;
    background: rgba(16, 24, 32, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
}

#dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--primary-accent);
}

#dropdown-username {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(15, 255, 213, 0.1);
    color: var(--primary-accent);
}

.logout-item {
    color: #e74c3c;
}

.logout-item:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #ff6b6b;
}