:root {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    font-weight: 400;
    color-scheme: dark;
    
    /* Palette */
    --color-bg: #0a0a0a;
    --color-card-bg: #141414;
    --color-gold: #D4AF37;
    --color-gold-hover: #F4CF57;
    --color-text-main: #FFFFFF;
    --color-text-muted: #AAAAAA;
    --color-border: #333333;
    --color-error: #ff4d4d;
    
    background-color: var(--color-bg);
    color: var(--color-text-main);
    
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    display: flex;
    place-items: center;
    min-width: 320px;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1a1a1a, #000000);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.admin-container {
    text-align: left;
    max-width: 900px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--color-gold);
    margin-bottom: 0.5em;
    letter-spacing: 1px;
}

h1 {
    font-size: 3.5em;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 svg {
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

p {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-muted);
}

button {
    border-radius: 4px;
    border: 1px solid var(--color-gold);
    padding: 0.8em 1.5em;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background-color: transparent;
    color: var(--color-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    background-color: var(--color-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

input, select, textarea {
    padding: 0.8em;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    margin: 0.5em 0;
    background: #000;
    color: var(--color-gold);
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

.hidden {
    display: none !important;
}

.error {
    color: var(--color-error);
    font-family: 'Inter', sans-serif;
}

/* Admin Styles */
.section {
    margin-bottom: 3rem;
    background: var(--color-card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
}

th {
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
    color: var(--color-gold);
    border-bottom: 2px solid var(--color-border);
    padding: 1rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

code {
    background: #000;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: var(--color-gold);
    font-family: monospace;
    border: 1px solid var(--color-border);
}

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

.form-group.vertical {
    flex-direction: column;
    align-items: stretch;
}

select[multiple] {
    height: 120px;
}

.log-item {
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    background: #000;
    transition: transform 0.2s;
}

.log-item:hover {
    border-color: var(--color-gold);
}

.log-item h3 {
    margin-top: 0;
    font-size: 1.5em;
}

/* Vote Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.header span {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: var(--color-gold);
}

.voting-card {
    background: var(--color-card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.voting-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.description {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    font-family: 'Inter', serif;
    font-size: 1.1em;
    line-height: 1.8;
}

.sliders {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.slider-group label {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: var(--color-text-main);
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    margin: 0;
    padding: 0;
    border: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--color-gold);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #333;
    border-radius: 2px;
}

.vote-btn {
    width: 100%;
    font-size: 1.2rem;
    background-color: var(--color-gold);
    color: #000;
    border: none;
    margin-top: 1rem;
}

.vote-btn:hover {
    background-color: var(--color-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.small-btn {
    padding: 0.5em 1em;
    font-size: 0.8em;
    border-color: var(--color-border);
    color: var(--color-text-muted);
}

.small-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: transparent;
    box-shadow: none;
}

.progress {
    margin-top: 2rem;
    font-size: 0.9em;
    color: var(--color-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.finished {
    animation: fadeIn 1s ease-in;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.2em;
        flex-direction: column;
        gap: 10px;
    }

    h1 svg {
        width: 60px;
        height: 60px;
    }

    .admin-container {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group button {
        width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid var(--color-border);
        margin-bottom: 1rem;
        border-radius: 4px;
        background: #000;
    }

    td {
        border: none;
        border-bottom: 1px solid var(--color-border);
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    td:before {
        position: absolute;
        top: 1rem;
        left: 1rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--color-gold);
        content: attr(data-label);
    }

    td:last-child {
        border-bottom: none;
    }

    .voting-card {
        padding: 1.5rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
