:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #475569;
    --background: #f8fafc;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-solid: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Dynamic Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, rgba(139, 92, 246, 0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Layout */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex: 1;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.center-all {
    justify-content: center;
    align-items: center;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-container img {
    height: 80px;
    object-fit: contain;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.secondary-btn {
    background: white;
    color: var(--text);
    border: 1px solid #e2e8f0;
}

.secondary-btn:hover {
    background: #f1f5f9;
}

.success-btn {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.success-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Voting Screens */
header {
    margin-bottom: 2rem;
    background: var(--surface);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.voter-info {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.list-card {
    background: var(--surface-solid);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.list-card.selected {
    border-color: var(--primary);
    background: rgba(239, 246, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.list-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.list-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.list-card h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.list-card .slogan {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.list-card .desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-light);
}

.footer-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding: 1.5rem;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

/* Confirm Screen */
.confirm-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .confirm-container {
        grid-template-columns: 1fr;
    }
}

.confirm-card {
    background: var(--surface-solid);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.confirm-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.confirm-selection {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Success Screen */
.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.success-card {
    text-align: center;
}

.success-card h2 {
    color: var(--success);
    margin-bottom: 1rem;
}

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

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(37, 99, 235, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Animations */
.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-in-up { animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.fade-in-down { animation: fadeInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* CSS for split login card */
.login-split-card {
    display: flex;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
}

@media (max-width: 768px) {
    .login-split-card {
        flex-direction: column;
    }
}

.login-left {
    flex: 1;
    background: #f8fafc;
    padding: 3rem;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand span {
    font-size: 1.1rem;
    line-height: 1.2;
    color: var(--text);
}

.portal-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: none;
    -webkit-text-fill-color: var(--primary);
    text-align: left;
}

.portal-desc {
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.auth-tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: auto;
}

.auth-tab {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.auth-tab.active .icon {
    color: var(--primary);
}

.auth-tab.active strong {
    color: var(--primary);
}

.auth-tab.disabled {
    opacity: 0.5;
}

.auth-tab .icon {
    font-size: 1.5rem;
}

.auth-tab div {
    display: flex;
    flex-direction: column;
}

.auth-tab strong {
    font-size: 1rem;
    color: var(--text);
}

.auth-tab span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.security-badges {
    margin-top: 3rem;
    color: var(--text-light);
}

.badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
}

/* Right Panel */
.login-right {
    flex: 1;
    padding: 3rem;
    background: white;
}

.right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.right-header h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin: 0;
}

.tag {
    background: #f1f5f9;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag::before {
    content: '👤';
}

.text-light {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--secondary);
    cursor: pointer;
}

.btn-animate {
    background: #8b9fd6;
}

.btn-animate.primary-btn {
    background: #8b9fd6; /* Matching the screenshot blue */
}

.btn-animate.primary-btn:hover {
    background: #7388c4;
}
