*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #111;
    --text-muted: #888;
    --border: #e0e0e0;
    --accent: #111;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #111;
    padding: 0.6rem 1.5rem;
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

#display-name {
    color: #666;
    font-size: 0.82rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    gap: 2rem;
}

.showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    min-height: 300px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.number {
    font-weight: 800;
    line-height: 1;
    transition: all 0.3s ease;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.theme-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.theme-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn:hover {
    border-color: #999;
}

.btn-theme.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn-outline {
    background: transparent;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.theme-minimal {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.theme-minimal .number {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 10rem;
    color: #111;
}

.theme-retro {
    background: #0a0a0a;
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
}

.theme-retro::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
}

.theme-retro .number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 9rem;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.theme-neon {
    background: #0d0221;
    border: 1px solid #1a0a3e;
}

.theme-neon .number {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 10rem;
    color: #ff00ff;
    text-shadow:
        0 0 7px #ff00ff,
        0 0 20px #ff00ff,
        0 0 42px #ff00ff,
        0 0 80px #bc13fe;
    animation: neon-flicker 3s infinite alternate;
}

@keyframes neon-flicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0.8; }
    97% { opacity: 1; }
    98% { opacity: 0.6; }
}

.theme-brutalist {
    background: #ff0;
    border: 4px solid #000;
    border-radius: 0;
}

.theme-brutalist .number {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 12rem;
    color: #000;
    letter-spacing: -0.08em;
    -webkit-text-stroke: 3px #000;
}

.theme-ascii {
    background: #1a1a2e;
    border: 2px solid #e94560;
    font-family: 'Courier New', Courier, monospace;
}

.theme-ascii .number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 8rem;
    color: #e94560;
    letter-spacing: 0.15em;
    border: 2px dashed #e94560;
    padding: 1rem 2rem;
}

.login-page {
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 360px;
    padding: 0 1.5rem;
}

.login-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    text-align: center;
}

.login-header {
    margin-bottom: 1.5rem;
}

.login-logo {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    text-align: center;
}

.form-group input:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
    .number {
        font-size: 6rem !important;
    }
    .showcase {
        min-height: 200px;
    }
}
