/* mybadge.page — Badge Forge */

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

:root {
    --pink: #ff2d7b;
    --cyan: #00ffd5;
    --gold: #ffb800;
    --void: #0a0a12;
    --deep-purple: #1a1028;
    --muted: #6b6b8a;
    --light-lavender: #b8b8d0;
    --near-white: #e0e0f0;
    --dark-bg: #0d0d1a;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--void);
    color: var(--near-white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
}

/* Split Screen */
.split-screen {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.panel {
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

/* Left Panel - The Forge */
.panel-forge {
    width: 50vw;
    background: var(--void);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0, 255, 213, 0.1);
}

.forge-header {
    text-align: center;
    margin-bottom: 2rem;
}

.forge-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(0, 255, 213, 0.3);
}

.forge-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.forge-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#forgeCanvas {
    border-radius: 50%;
    background: radial-gradient(circle, var(--deep-purple) 0%, var(--void) 70%);
    box-shadow: 0 0 60px rgba(255, 45, 123, 0.1), inset 0 0 40px rgba(0, 255, 213, 0.05);
    transition: box-shadow 0.6s ease;
}

#forgeCanvas.active {
    box-shadow: 0 0 100px rgba(255, 45, 123, 0.3), 0 0 60px rgba(0, 255, 213, 0.2), inset 0 0 60px rgba(0, 255, 213, 0.1);
}

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

.forge-btn {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--void);
    background: var(--cyan);
    border: none;
    padding: 0.9rem 2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.forge-btn:hover {
    background: var(--pink);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 45, 123, 0.4);
}

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

.btn-icon {
    font-size: 1.1rem;
}

.seed-display {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.forge-status {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.status-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Right Panel - The Gallery */
.panel-gallery {
    width: 50vw;
    background: linear-gradient(180deg, var(--deep-purple) 0%, var(--dark-bg) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(184, 184, 208, 0.1);
}

.gallery-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--near-white);
}

.gallery-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
}

.gallery-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    align-content: start;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.gallery-hint {
    margin-top: 0.5rem;
    color: var(--cyan);
    opacity: 0.6;
    font-size: 0.75rem;
}

/* Badge Cards in Gallery */
.badge-card {
    aspect-ratio: 1;
    border-radius: 12px;
    background: rgba(26, 16, 40, 0.8);
    border: 1px solid rgba(0, 255, 213, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: badgeAppear 0.5s ease-out;
}

@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.badge-card:hover {
    border-color: var(--pink);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 45, 123, 0.3);
}

.badge-card canvas {
    width: 80%;
    height: 80%;
    border-radius: 50%;
}

/* Particle Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}

/* Scrollbar */
.panel-gallery::-webkit-scrollbar {
    width: 4px;
}

.panel-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.panel-gallery::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .split-screen {
        flex-direction: column;
    }
    .panel-forge, .panel-gallery {
        width: 100vw;
        height: 50vh;
    }
    #forgeCanvas {
        width: 200px;
        height: 200px;
    }
}
