@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:wght@400;700&display=swap');

@font-face {
    font-family: 'Apercu Pro';
    src: url('https://db.onlinewebfonts.com/t/209c159847116a8a183d56d4825d1948.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    font-family: 'Apercu Pro', -apple-system, system-ui, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Global Header from Screenshot */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

/* Hide header/footer when overlays are visible */
body:has(.overlay:not(.hidden)) .global-header,
body:has(.overlay:not(.hidden)) .voting-footer {
    display: none !important;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 32px;
    height: 32px;
}

.status-capsule {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    color: white;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
}

.partner-logo {
    height: 28px;
}

/* Notification Container */
#notification-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: auto;
    max-width: 90%;
}

.notification {
    background: #400;
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: white;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: #000 !important;
}

.overlay.hidden {
    display: none !important;
}

/* Success Screen */
.success-content {
    text-align: center;
}

.huge-title {
    font-size: 72px;
    margin: 0;
    font-weight: 900;
}

.success-subtext {
    font-size: 18px;
    opacity: 0.6;
    margin-top: 10px;
}

/* Verification Screen */
.main-card {
    background: #1a1a1a;
    padding: 40px 30px;
    border-radius: 30px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

#auth-code {
    font-family: 'Google Sans Code', monospace !important;
    font-size: 40px;
    font-weight: 400;
    /* Regular 400 as requested */
    color: #fff;
    margin: 20px 0;
    letter-spacing: 2px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#auth-code.copied {
    color: #00ff66;
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
}

.code-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Google Sans Code', monospace !important;
    font-weight: 400;
}

.code-box:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bottom-partner-mini {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mini-partner-text {
    font-size: 14px;
    opacity: 0.8;
}

.mini-partner-logo {
    height: 40px;
}

/* Voting Interface */
#voting-interface {
    padding-top: 80px;
    padding-bottom: 160px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.voting-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.voting-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.voting-header p {
    font-size: 14px;
    opacity: 0.6;
}

.votes-left {
    color: #ff7300;
    font-weight: bold;
    margin-top: 10px !important;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 15px;
}

.candidate-card {
    background: #151518;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 1/1.3;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.candidate-card:active {
    transform: scale(0.95);
}

.candidate-card.selected {
    box-shadow: 0 0 0 2px #ff7300;
    background: #1c1c20;
}

.vote-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff7300;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.candidate-image {
    width: 100%;
    height: 75%;
    background-size: cover;
    background-position: center;
}

.candidate-name {
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    padding: 0 5px;
    text-align: center;
}

/* Voting Footer */
.voting-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #151518;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 500;
}

.selected-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.selected-info h3 {
    margin: 0;
    font-size: 14px;
    opacity: 0.6;
}

.selected-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.selected-dot {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 2px solid #ff7300;
}

.primary-btn-new {
    background: #004de6;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
}

.primary-btn-new:disabled {
    opacity: 0.3;
}

@media (min-width: 768px) {
    .voting-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px 40px;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 900px;
        border-radius: 30px;
    }

    .primary-btn-new {
        width: auto;
        padding: 15px 40px;
    }

    .selected-info {
        flex-direction: row;
        align-items: center;
    }
}