/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #0f0f0f 100%);
    min-height: 100vh;
    color: #e8e8e8;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 26, 26, 0.9) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
    position: relative;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.title i {
    color: #ffd700;
    margin-right: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    margin-top: 5px;
    color: rgba(255, 215, 0, 0.9);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.description {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.8);
    margin: 10px 0 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(232, 232, 232, 0.7);
    margin-top: 5px;
}

.navigation {
    position: absolute;
    top: 20px;
    right: 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    color: #ffd700;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 215, 0, 0.3);
}

/* Loading Styles */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: rgba(232, 232, 232, 0.8);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top: 3px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-bottom: 30px;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Candidate Card */
.candidate-card {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(26, 26, 26, 0.95) 50%, 
        rgba(0, 0, 0, 0.9) 100%);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 215, 0, 0.1);
}

.candidate-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.candidate-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.candidate-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
    margin-right: 15px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
}

.candidate-info h3 {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.candidate-role {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    color: #ffd700;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 215, 0, 0.4);
    display: inline-block;
}

.candidate-bio {
    color: rgba(232, 232, 232, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.candidate-highlights {
    margin-bottom: 20px;
}

.candidate-highlights h4 {
    font-size: 1rem;
    color: #ffd700;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

.highlight-item {
    font-size: 0.8rem;
    color: rgba(232, 232, 232, 0.7);
    margin-bottom: 6px;
    padding-left: 15px;
    position: relative;
}

.highlight-item::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #ffd700;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

.candidate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.vote-count i {
    color: #ffd700;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.vote-number {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.vote-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    color: #ffd700;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.vote-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 215, 0, 0.3);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(100, 100, 100, 0.5);
    color: rgba(200, 200, 200, 0.7);
}

.vote-btn.voted {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(0, 255, 0, 0.4);
    color: #00ff00;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 15px 20px;
    backdrop-filter: blur(20px);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(255, 215, 0, 0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd700;
}

.toast-content i {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.modal-header h3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.modal-close {
    background: none;
    border: none;
    color: rgba(232, 232, 232, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.modal-body {
    padding: 25px;
}

.candidate-preview {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.candidate-preview .candidate-avatar {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.candidate-preview h4 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

.candidate-preview p {
    color: rgba(232, 232, 232, 0.7);
    font-size: 0.9rem;
}

.vote-warning {
    color: rgba(232, 232, 232, 0.9);
    margin-bottom: 15px;
    font-size: 1rem;
}

.vote-notice {
    color: rgba(232, 232, 232, 0.6);
    font-size: 0.9rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.5);
    color: rgba(200, 200, 200, 0.8);
}

.btn-secondary:hover {
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(100, 100, 100, 0.7);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(232, 232, 232, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: 20px;
}

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

    .title {
        font-size: 1.5rem;
    }

    .navigation {
        position: static;
        margin-top: 15px;
        text-align: center;
    }

    .stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .candidates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .candidate-card {
        padding: 20px;
    }

    .candidate-avatar {
        width: 60px;
        height: 60px;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}
