/* 
  Minecraft Election - Premium UI/UX 
  Aesthetic: Glassmorphism, Modern Typography, Minecraft Inspired Animations
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-main: 'Outfit', sans-serif;

    /* Premium Color Palette */
    --clr-primary: #6366f1;
    --clr-primary-hover: #4f46e5;
    --clr-secondary: #0ea5e9;
    --clr-accent: #10b981;
    --clr-danger: #ef4444;
    --clr-warning: #f59e0b;

    /* Minecraft Colors */
    --mc-grass: #7fb238;
    --mc-dirt: #866043;
    --mc-stone: #7a7a7a;
    --mc-diamond: #4cedd9;
    --mc-gold: #fdf55f;

    /* Light Theme Tokens */
    --bg-body-light: #f8fafc;
    --bg-card-light: rgba(255, 255, 255, 0.85);
    --text-main-light: #1e293b;
    --text-muted-light: #64748b;
    --border-light: rgba(226, 232, 240, 0.8);
    --shadow-light: 0 10px 30px -5px rgba(0, 0, 0, 0.05);

    /* Dark Theme Tokens */
    --bg-body-dark: #0f172a;
    --bg-card-dark: rgba(30, 41, 59, 0.7);
    --text-main-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    --border-dark: rgba(51, 65, 85, 0.5);
    --shadow-dark: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body-light);
    color: var(--text-main-light);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-theme="dark"] {
    background-color: var(--bg-body-dark);
    color: var(--text-main-dark);
}

/* === MINECRAFT ANIMATED BACKGROUND === */
.background-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.05), transparent);
}

.mc-blocks {
    position: absolute;
    width: 100%;
    height: 100%;
}

.mc-block {
    position: absolute;
    width: 60px;
    height: 60px;
    background-size: cover;
    opacity: 0.15;
    image-rendering: pixelated;
    pointer-events: none;
    animation: float-block 20s infinite linear;
    border-radius: 4px;
}

/* Mocking Minecraft block looks with gradients if textures aren't available */
.mc-block.grass {
    background: linear-gradient(to bottom, #7fb238 30%, #866043 30%);
}

.mc-block.diamond {
    background: radial-gradient(circle, #4cedd9, #299e90);
    box-shadow: 0 0 15px rgba(76, 237, 217, 0.3);
}

.mc-block.gold {
    background: radial-gradient(circle, #fdf55f, #cfa800);
}

.mc-block.stone {
    background: #7a7a7a;
    border: 2px solid #555;
}

@keyframes float-block {
    0% {
        transform: translateY(110vh) rotate(0deg);
    }

    100% {
        transform: translateY(-20vh) rotate(360deg);
    }
}

/* === GLASSMORPHISM CONTAINERS === */
.glass-panel {
    background: var(--bg-card-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

body[data-theme="dark"] .glass-panel {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-dark);
}

/* === INITIAL LOGIN === */
.initial-login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.initial-login-card,
.login-card {
    max-width: 480px;
    width: 100%;
    padding: 3rem;
    text-align: center;
}

.initial-login-card h2,
.login-card h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.initial-login-card p,
.login-card p {
    color: var(--text-muted-light);
    margin-bottom: 2rem;
}

body[data-theme="dark"] .initial-login-card p,
body[data-theme="dark"] .login-card p {
    color: var(--text-muted-dark);
}

/* === MAIN APP LAYOUT === */
.app-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 85vh;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

body[data-theme="dark"] .header-section {
    border-bottom: 1px solid var(--border-dark);
}

.app-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--clr-primary);
}

.app-main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .app-main-grid {
        grid-template-columns: 1fr;
    }
}

/* === NAVIGATION === */
.nav-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px;
    border-radius: 16px;
    width: max-content;
}

body[data-theme="dark"] .nav-tabs {
    background: rgba(255, 255, 255, 0.03);
}

.nav-tab {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted-light);
}

body[data-theme="dark"] .nav-tab {
    color: var(--text-muted-dark);
}

.nav-tab:hover {
    color: var(--clr-primary);
}

.nav-tab.active {
    background: white;
    color: var(--clr-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] .nav-tab.active {
    background: #334155;
    color: white;
}

/* === FORMS & INPUTS === */
.input-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

#login-form-container {
    width: 100%;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main-light);
    text-align: left;
}

body[data-theme="dark"] .input-label {
    color: var(--text-main-dark);
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

body[data-theme="dark"] .input-field {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-dark);
    color: white;
}

.input-field:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* === BUTTONS === */
.btn,
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}


.btn:hover,
.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.action-button:active,
.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main-light);
}

body[data-theme="dark"] .btn-ghost {
    border: 1px solid var(--border-dark);
    color: white;
}

.btn-danger {
    background: #fee2e2;
    color: #ef4444;
}

body[data-theme="dark"] .btn-danger {
    background: #450a0a;
    color: #f87171;
}

/* === PARTY CARDS === */
.party-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.party-card {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.party-card:hover {
    transform: translateY(-8px);
}

.party-logo,
.party-logo-small,
.party-logo-large {
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.party-logo {
    width: 100px;
    height: 100px;
}

.party-logo-small {
    width: 50px;
    height: 50px;
    border-width: 2px;
    border-radius: 50%;
}

.party-logo-large {
    max-width: 120px;
    height: auto;
}

.party-name {
    font-size: 1.25rem;
    font-weight: 800;
}

/* === LIVE VOTE SIDEBAR === */
.sidebar-panel {
    padding: 1.5rem;
    height: fit-content;
}

.vote-tally-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vote-tally-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

body[data-theme="dark"] .vote-tally-item {
    background: rgba(255, 255, 255, 0.05);
}

.vote-count-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background-color: var(--bg-card-light);
    color: var(--text-main-light);
    backdrop-filter: blur(5px);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .vote-count-item {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.vote-count-item span,
.vote-count-item div {
    max-width: 100%;
    word-break: break-word;
}

.vote-count-item .flex-grow {
    min-width: 0;
}


.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--clr-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

.progress-bar-container {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--clr-primary), var(--clr-secondary));
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 3D VOTE ANIMATION === */
.vote-3d-overlay,
.vote-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 2000px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.vote-3d-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.vote-3d-stage {
    position: relative;
    transform-style: preserve-3d;
    margin-bottom: 4rem;
}

.vote-box-3d {
    width: 240px;
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-25deg) rotateY(35deg);
    animation: masterBoxFloat 4s infinite alternate ease-in-out;
}

@keyframes masterBoxFloat {
    0% {
        transform: rotateX(-25deg) rotateY(35deg) translateY(0);
    }

    100% {
        transform: rotateX(-15deg) rotateY(45deg) translateY(-30px);
    }
}

.vote-box-face {
    position: absolute;
    background: #1e293b;
    border: 3px solid var(--clr-primary);
    box-shadow: inset 0 0 50px rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.front {
    width: 240px;
    height: 180px;
    transform: translateZ(90px);
}

.back {
    width: 240px;
    height: 180px;
    transform: rotateY(180deg) translateZ(90px);
}

.left {
    width: 180px;
    height: 180px;
    transform: rotateY(-90deg) translateZ(120px);
}

.right {
    width: 180px;
    height: 180px;
    transform: rotateY(90deg) translateZ(120px);
}

.top {
    width: 240px;
    height: 180px;
    transform: rotateX(90deg) translateZ(90px);
    background: #334155;
    overflow: hidden;
}

/* The Slot */
.top::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 14px;
    background: #020617;
    border-radius: 99px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 1) inset;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hand-paper-container {
    position: absolute;
    width: 200px;
    height: 300px;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    z-index: 100;
    pointer-events: none;
    margin-left: -100px;
    margin-top: -150px;
    animation: handApproach 4s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.voting-hand {
    position: absolute;
    width: 140px;
    height: auto;
    bottom: -60px;
    right: -40px;
    transform: rotate(-15deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
    animation: handWithdraw 4s forwards cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
}

.vote-paper-3d {
    position: absolute;
    width: 150px;
    height: 100px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #020617;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #cbd5e1;
    z-index: 10;
    left: 25px;
    bottom: 80px;
    transform-origin: bottom center;
    animation: paperDropSlot 4s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-voter {
    font-size: 0.9rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.paper-divider {
    width: 80%;
    height: 2px;
    background: rgba(99, 102, 241, 0.4);
    margin: 6px 0;
    border-radius: 2px;
}

.paper-party {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--clr-primary-dark);
}

@keyframes handApproach {
    0% {
        transform: translateY(-400px) translateZ(150px) rotateX(10deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translateY(-200px) translateZ(150px) rotateX(5deg);
    }

    30% {
        transform: translateY(-100px) translateZ(150px) rotateX(0deg);
    }

    50% {
        transform: translateY(-20px) translateZ(150px) rotateX(15deg);
    }

    100% {
        transform: translateY(-20px) translateZ(150px) rotateX(15deg);
        opacity: 1;
    }
}

@keyframes handWithdraw {

    0%,
    50% {
        transform: rotate(-15deg) translate(0, 0);
        opacity: 1;
    }

    55% {
        transform: rotate(-10deg) translate(40px, -20px);
        opacity: 1;
    }

    70% {
        transform: rotate(0deg) translate(150px, -100px);
        opacity: 0;
    }

    100% {
        transform: rotate(0deg) translate(150px, -100px);
        opacity: 0;
    }
}

@keyframes paperDropSlot {

    0%,
    50% {
        transform: translateY(0) rotateX(0deg);
        opacity: 1;
    }

    60% {
        transform: translateY(30px) translateZ(-20px) rotateX(30deg);
        opacity: 1;
    }

    80% {
        transform: translateY(80px) translateZ(-50px) rotateX(90deg) scale(0.9);
        opacity: 1;
    }

    90% {
        transform: translateY(110px) translateZ(-60px) rotateX(95deg) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(110px) translateZ(-60px) rotateX(95deg) scale(0.8);
        opacity: 0;
    }
}

.status-indicator {
    text-align: center;
    z-index: 20;
}

.status-text {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-checkmark {
    width: 120px;
    height: 120px;
    background: var(--clr-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    margin: 0 auto;
    transform: scale(0);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.5);
    animation: popCenter 0.6s 3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popCenter {
    from {
        transform: scale(0) rotate(-45deg);
    }

    to {
        transform: scale(1) rotate(0deg);
    }
}

.vote-success-text {
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e5e7eb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: successFade 4s ease forwards;
    z-index: 3000;
}

@keyframes successFade {
    0% {
        opacity: 0;
        transform: translate(-50%, 30px);
    }

    15% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
}

.pulsing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-left: 5px;
    animation: dotPulse 1.5s infinite;
}

.pulsing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.pulsing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(0.5);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Modals and alerts */
.custom-alert-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.custom-alert-modal.visible {
    display: flex;
}

.custom-alert-content {
    background-color: var(--bg-card-light);
    color: var(--text-main-light);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease-out;
    border: 1px solid var(--border-light);
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

body[data-theme="dark"] .custom-alert-content {
    background-color: var(--bg-card-dark);
    color: var(--text-main-dark);
    border: 1px solid var(--border-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.disabled-message,
.error-message-box,
.disabled-message-error {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--clr-danger);
    border: 2px solid #b91c1c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .disabled-message,
body[data-theme="dark"] .error-message-box,
body[data-theme="dark"] .disabled-message-error {
    background-color: #7f1d1d;
    border-color: #fca5a5;
}

/* === UTILS === */
.hidden {
    display: none !important;
}

/* === MOBILE === */
@media (max-width: 640px) {
    .app-container {
        padding: 1.5rem;
        margin: 0;
    }

    .nav-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .party-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   REGISTRATION PANEL — Premium Glassmorphism Redesign
   ============================================================ */

/* Outer panel */
.reg-panel {
    padding: 2.5rem 3rem 3rem;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Subtle ambient glow behind the panel */
.reg-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(76, 237, 217, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.reg-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.reg-panel>* {
    position: relative;
    z-index: 1;
}

/* ── Header area ─────────────────────────── */
.reg-header {
    margin-bottom: 2.25rem;
}

.reg-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--clr-primary), var(--mc-diamond));
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.reg-header-badge svg {
    width: 12px;
    height: 12px;
}

.reg-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--clr-primary), var(--mc-diamond));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.4rem;
}

.reg-subtitle {
    font-size: 0.9rem;
    opacity: 0.6;
    font-weight: 400;
}

/* ── 2-column CSS Grid layout ─────────────── */
.reg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem 2.5rem;
    align-items: start;
}

.reg-fields-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reg-logo-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reg-submit-row {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

/* ── Input groups / labels ───────────────── */
.reg-input-group {
    margin-bottom: 0 !important;
}

.reg-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.75;
    margin-bottom: 0.55rem !important;
}

.reg-label svg {
    width: 13px;
    height: 13px;
}

/* ── 3D Lift on input fields ─────────────── */
.reg-field {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.22s ease,
        border-color 0.2s ease !important;
    transform-style: preserve-3d;
}

.reg-field:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.18),
        0 2px 0 var(--clr-primary);
    border-color: var(--clr-primary) !important;
}

.reg-field:focus {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
        0 8px 20px rgba(99, 102, 241, 0.15) !important;
}

/* Bigger font for symbol field */
.reg-field--symbol {
    font-size: 1.4rem;
    text-align: center;
    letter-spacing: 0.15em;
}

/* ── Drag-and-drop upload zone ───────────── */
.upload-dropzone {
    flex: 1;
    min-height: 220px;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: rgba(99, 102, 241, 0.03);
    transition: border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.25s ease;
}

.upload-dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(76, 237, 217, 0.07), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.drag-over {
    border-color: var(--mc-diamond);
    background: rgba(76, 237, 217, 0.05);
    transform: translateY(-5px) scale(1.015);
    box-shadow:
        0 12px 32px rgba(76, 237, 217, 0.18),
        0 0 0 1px rgba(76, 237, 217, 0.25);
    outline: none;
}

.upload-dropzone:hover::before,
.upload-dropzone:focus-visible::before,
.upload-dropzone.drag-over::before {
    opacity: 1;
}

/* Placeholder content inside dropzone */
.dropzone-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 1.5rem;
    pointer-events: none;
}

.dropzone-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(76, 237, 217, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(76, 237, 217, 0.2);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.upload-dropzone:hover .dropzone-icon-wrap {
    box-shadow: 0 0 20px rgba(76, 237, 217, 0.35);
    transform: scale(1.08) rotate(-3deg);
}

.dropzone-icon {
    width: 26px;
    height: 26px;
    color: var(--mc-diamond);
    stroke-width: 1.8;
}

.dropzone-headline {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main-light);
}

body[data-theme="dark"] .dropzone-headline {
    color: var(--text-main-dark);
}

.dropzone-sub {
    font-size: 0.78rem;
    opacity: 0.5;
    font-weight: 500;
}

.dropzone-hint {
    font-size: 0.68rem;
    opacity: 0.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 600;
}

/* Preview image inside the dropzone */
.dropzone-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    border-radius: 18px;
    display: block !important;
    /* overrides .hidden when JS removes class */
}

/* Glow ring around preview image */
.upload-dropzone.has-preview {
    border-style: solid;
    border-color: var(--mc-diamond);
    box-shadow:
        0 0 0 3px rgba(76, 237, 217, 0.25),
        0 0 30px rgba(76, 237, 217, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.upload-dropzone.has-preview:hover {
    box-shadow:
        0 0 0 4px rgba(76, 237, 217, 0.4),
        0 16px 40px rgba(76, 237, 217, 0.35),
        inset 0 0 20px rgba(0, 0, 0, 0.15);
}

/* ── Submit button 3D press effect ────────── */
.reg-submit-btn {
    position: relative;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding: 14px 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    box-shadow:
        0 6px 0 var(--clr-primary-hover),
        0 10px 24px rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    transition:
        transform 0.12s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s ease;
}

.reg-submit-btn:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 0 var(--clr-primary-hover),
        0 18px 36px rgba(99, 102, 241, 0.55);
}

.reg-submit-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 1px 0 var(--clr-primary-hover),
        0 4px 10px rgba(99, 102, 241, 0.3);
}

.reg-submit-btn svg {
    width: 18px;
    height: 18px;
}

/* ── Responsive collapse to single column ─── */
@media (max-width: 680px) {
    .reg-form-grid {
        grid-template-columns: 1fr;
    }

    .reg-panel {
        padding: 1.75rem 1.5rem 2rem;
    }

    .upload-dropzone {
        min-height: 180px;
    }
}