:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-1: #0f172a;
    --bg-gradient-2: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --input-bg: rgba(0, 0, 0, 0.2);
    --glass-bg-accent: rgba(255, 255, 255, 0.1);
}

body.light-mode {
    --primary: #4f46e5;
    --primary-hover: #6366f1;
    --bg-gradient-1: #e2e8f0;
    --bg-gradient-2: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #059669;
    --input-bg: rgba(255, 255, 255, 0.5);
    --glass-bg-accent: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-main);
    padding-top: 80px;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.glass {
    position: relative;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.display-container {
    position: relative;
    margin-bottom: 30px;
}

#password-display, #gamertag-display, #team-display {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    padding: 20px 60px 20px 20px;
    border-radius: 20px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

body.light-mode #password-display,
body.light-mode #gamertag-display,
body.light-mode #team-display {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
    text-shadow: none;
}

#password-display:focus, #gamertag-display:focus, #team-display:focus {
    border-color: var(--primary);
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 102, 241, 0.4);
    background: rgba(0, 0, 0, 0.4);
}

body.light-mode #password-display:focus,
body.light-mode #gamertag-display:focus,
body.light-mode #team-display:focus {
    background: #ffffff;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.05), 0 0 20px rgba(99, 102, 241, 0.3);
}

.custom-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.custom-input::placeholder {
    color: var(--text-muted);
}

.icon-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
}

.icon-btn:hover {
    color: var(--text-main);
    background: var(--glass-bg-accent);
}

.icon-btn.copied {
    color: var(--success);
}

.options {
    margin-bottom: 30px;
}

.length-slider-container {
    background: var(--input-bg);
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.label {
    font-weight: 500;
    color: var(--text-muted);
}

.length-value {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--glass-bg-accent);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--primary);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    border: none;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--primary);
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.toggles-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    background: var(--input-bg);
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-bg-accent);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-round {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:focus + .slider-round {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider-round:before {
    transform: translateX(20px);
    background-color: white;
}

/* Landing Page & Header Styles */
.header-nav {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    justify-content: center;
}

.header-nav h1 {
    margin-bottom: 0;
}

.back-btn {
    position: absolute;
    left: 0;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: var(--text-main);
}

.text-center {
    text-align: center;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.choice-card {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.choice-card:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.3);
}

.choice-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.choice-card h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 600;
}

.choice-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.theme-toggle-wrapper {
    text-align: center;
    margin-top: 30px;
}

.theme-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.theme-btn:hover {
    background: var(--glass-bg-accent);
    transform: translateY(-2px);
}

/* Top Navbar Styles */
.top-navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    z-index: 100;
}

.top-navbar .nav-left, .top-navbar .nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.top-navbar .nav-right {
    justify-content: flex-end;
}

.top-navbar .nav-center {
    flex: 2;
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.nav-center .title-text {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.beta-badge {
    font-size: 0.55rem;
    background: var(--primary);
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.nav-back {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    margin-right: 15px;
    transition: all 0.2s ease;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-back:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.team-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

/* Team Generator Styles */
.vibe-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.vibe-btn {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 6px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vibe-btn:hover {
    background: var(--glass-bg-accent);
}

.vibe-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#btn-easy.active {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#btn-medium.active {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#btn-hard.active {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Stats Counter Styles */
.stats-container {
    display: flex;
    justify-content: space-around;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--glass-border);
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-icon.pulse {
    animation: pulse-animation 2s infinite ease-in-out;
}

@keyframes pulse-animation {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

.stat-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
