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

:root {
    --bg-color: #0f172a;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

h1, h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Login Form */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="password"], input[type="text"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

input[type="password"]:focus, input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

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

.btn:disabled {
    background: #475569;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    color: var(--danger);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Voting Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.option-label.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

.option-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.option-label.selected .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.option-label.selected .custom-checkbox::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.option-text {
    font-size: 1rem;
    line-height: 1.4;
}

/* Status & Results */
.status-list {
    margin-top: 2rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1.1rem;
}

.status-item:last-child {
    border-bottom: none;
}

.status-voted {
    color: var(--success);
    font-weight: 600;
}

.status-waiting {
    color: var(--text-muted);
    font-style: italic;
}

.results-section {
    margin-top: 2rem;
    animation: fadeIn 1s ease;
}

.result-bar-container {
    margin-bottom: 1.5rem;
}

.result-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 6px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
