:root {
    --bg-color: #0d1117;
    --text-color: #ffffff;
    --text-muted: #8b949e;
    --primary: #5a32fa;
    --primary-hover: #6a4bff;
    --glass-bg: rgba(22, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --orb-1: #5a32fa;
    --orb-2: #fa32a0;
    --error: #f85149;
    --success: #2ea043;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background animated orbs */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.orb {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
    opacity: 0.5;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--orb-1);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--orb-2);
    bottom: -50px;
    right: -100px;
    animation-delay: -5s;
    opacity: 0.3;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--primary);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 100px) scale(1.2);
    }
}

/* Layout */
.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.view {
    display: none;
    flex-direction: column;
    gap: 2rem;
}

.view.active {
    display: flex;
}

/* Typography */
header {
    text-align: center;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

h1 span {
    color: var(--primary);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Forms */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0e0e0;
}

input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 50, 250, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--orb-2));
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(90, 50, 250, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Messages */
.error-msg {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2rem;
}

/* Voting List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.question-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.question-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.question-item label {
    font-size: 1.1rem;
    color: #fff;
}

/* Sticky footer for submit */
.floating-submit {
    width: 100%;
    padding: 1.5rem;
    position: relative;
}

/* Success View */
.success-card {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px rgba(46, 160, 67, 0.4);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.small-text {
    font-size: 0.9rem;
    margin-top: 2rem;
    opacity: 0.6;
}

/* Admin Elements */
.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: var(--primary);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-item h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary);
}

.vote-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.vote-name {
    font-weight: 600;
}

.vote-count {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

.hidden {
    display: none !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .floating-submit {
        width: 100%;
    }

    h1 {
        font-size: 2.2rem;
    }
}