:root {
    --bg: #0f172a;
    --card: #0b1220;
    --accent: #7c3aed;
    --muted: #94a3b8;
    --text: #e6eef8;
    --primary-blue: #5b8dc9;
    --dark-bg: #0a0e27;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, system-ui, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.7) 0%, rgba(20, 10, 40, 0.7) 100%), url('./images/KanameAya - miruzuya 3 1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.nav-tabs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-pill:hover,
.nav-pill.active {
    background: rgba(91, 141, 201, 0.8);
    border-color: rgba(91, 141, 201, 1);
    color: white;
}

/* Account Menu */
.account-menu {
    position: relative;
}

.account-btn {
    background: rgba(91, 141, 201, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.account-btn:hover {
    background: rgba(91, 141, 201, 1);
}

.account-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.account-dropdown.show {
    opacity: 1;
    visibility: visible;
}

.account-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease;
    font-weight: 500;
}

.account-dropdown a:last-child {
    border-bottom: none;
}

.account-dropdown a:hover {
    background: rgba(91, 141, 201, 0.15);
    color: var(--primary-blue);
}

/* Hero Section */
.container.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    margin: 0 0 40px;
    line-height: 1.1;
    color: white;
    text-shadow: 0 0 20px rgba(91, 141, 201, 0.6), 0 0 40px rgba(150, 100, 200, 0.4);
    letter-spacing: 3px;
}

.hero-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login {
    background: rgba(91, 141, 201, 0.8);
    color: white;
    border: 2px solid rgba(91, 141, 201, 1);
}

.btn-login:hover {
    background: rgba(91, 141, 201, 1);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(91, 141, 201, 0.4);
}

.btn-play {
    background: rgba(91, 141, 201, 0.6);
    color: white;
    border: 2px solid rgba(91, 141, 201, 0.8);
}

.btn-play:hover {
    background: rgba(91, 141, 201, 0.8);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(91, 141, 201, 0.3);
}

/* Legacy styles (kept for other pages) */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: 80px;
}

.pull-form {
    background: rgba(255, 255, 255, 0.02);
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
    width: 100%;
    max-width: 420px;
}

.pull-form-container {
    text-align: center;
}

.pull-form h1 {
    margin: 0 0 24px;
    font-size: 2rem;
    color: white;
    text-shadow: 0 0 20px rgba(91, 141, 201, 0.6);
}

.pull-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: left;
}

.pull-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 16px;
}

.pull-form input[type="text"]:focus {
    outline: none;
    border-color: rgba(91, 141, 201, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.actions {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.actions button,
.btn-submit {
    background: rgba(91, 141, 201, 0.8);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.actions button:hover,
.btn-submit:hover {
    background: rgba(91, 141, 201, 1);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(91, 141, 201, 0.4);
}

.error {
    color: #ffb4b4;
    margin-top: 8px;
    font-size: .95rem;
    min-height: 1.1em;
    text-align: center;
}

/* Auth panel for login/register pages */
.auth-panel {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
    max-width: 420px;
    width: 100%;
    margin: 14px auto;
}

.auth-panel h1 {
    margin: 0 0 14px;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 1rem;
}

.auth-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.auth-form button:hover {
    filter: brightness(1.05);
}

/* Styles for the background video on gatcha.html */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25));
    z-index: 0;
    pointer-events: none;
}

/* Username display for gatcha.html: pinned to top-right with readable background */
.username {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
}

/* Reward box shown after background video ends */
.reward-box {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(2, 8, 22, 0.98);
    z-index: 9999;
    padding: max(12px, 5vw);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    overflow: auto;
}

.reward-box.visible {
    opacity: 1;
    pointer-events: auto;
}

.reward-box h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 2rem;
}

.reward-box img {
    max-width: min(85vw, 400px);
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.reward-rarity {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 600;
    font-size: 1rem;
    text-transform: capitalize;
}

.btn-pull-again {
    margin-top: 24px;
    padding: 12px 40px;
    background: rgba(91, 141, 201, 0.8);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pull-again:hover {
    background: rgba(91, 141, 201, 1);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(91, 141, 201, 0.4);
}

@media (max-width: 420px) {
    .pull-form {
        padding: 18px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}
