* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    background: linear-gradient(
        135deg,
        #001747,
        #0044cc,
        #0077ff,
        #0033aa,
        #001747
    );
    background-size: 300% 300%;
    animation: blueBackground 16s ease-in-out infinite;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 20px 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: -45%;
    width: 190%;
    height: 190%;
    pointer-events: none;
    z-index: -1;
    will-change: transform, background-position;
}

/* MULTI DIRECTION AURORA */
body::before {
    background:
        radial-gradient(
            ellipse at 20% 30%,
            rgba(0, 225, 255, 0.65),
            transparent 30%
        ),
        radial-gradient(
            ellipse at 80% 35%,
            rgba(70, 100, 255, 0.75),
            transparent 34%
        ),
        radial-gradient(
            ellipse at 50% 80%,
            rgba(0, 80, 255, 0.7),
            transparent 36%
        ),
        radial-gradient(
            ellipse at 15% 75%,
            rgba(120, 220, 255, 0.35),
            transparent 28%
        );
    filter: blur(50px);
    animation:
        auroraHorizontal 13s ease-in-out infinite,
        auroraVertical 19s ease-in-out infinite,
        auroraRotate 27s ease-in-out infinite;
}

/* MOVING GLASS REFLECTION */
body::after {
    background:
        linear-gradient(
            115deg,
            transparent 30%,
            rgba(255, 255, 255, 0.02) 38%,
            rgba(255, 255, 255, 0.3) 42%,
            rgba(100, 220, 255, 0.2) 45%,
            transparent 52%
        ),
        linear-gradient(
            25deg,
            transparent 35%,
            rgba(0, 190, 255, 0.2) 43%,
            rgba(255, 255, 255, 0.18) 46%,
            transparent 54%
        ),
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            transparent 115px,
            rgba(255, 255, 255, 0.07) 118px,
            transparent 124px,
            transparent 220px
        );
    background-size: 200% 200%, 180% 180%, 100% 100%;
    animation:
        glassHorizontal 11s ease-in-out infinite alternate,
        glassVertical 17s ease-in-out infinite alternate,
        glassRotate 23s ease-in-out infinite alternate;
}

/* BACKGROUND GRADIENT */
@keyframes blueBackground {
    0%   { background-position: 0% 20%; }
    35%  { background-position: 100% 80%; }
    65%  { background-position: 20% 100%; }
    100% { background-position: 0% 20%; }
}

/* LEFT TO RIGHT AND RIGHT TO LEFT */
@keyframes auroraHorizontal {
    0%   { translate: -7% 0; }
    30%  { translate: 8% 2%; }
    60%  { translate: 2% -3%; }
    100% { translate: -7% 0; }
}

/* TOP TO BOTTOM AND BOTTOM TO TOP */
@keyframes auroraVertical {
    0%   { top: -8%; }
    45%  { top: 8%; }
    75%  { top: 2%; }
    100% { top: -8%; }
}

/* SLOW RANDOM-LIKE ROTATION */
@keyframes auroraRotate {
    0%   { rotate: -8deg; scale: 1; }
    35%  { rotate: 6deg; scale: 1.08; }
    70%  { rotate: -4deg; scale: 0.96; }
    100% { rotate: 8deg; scale: 1.04; }
}

/* GLASS REFLECTION HORIZONTAL */
@keyframes glassHorizontal {
    0%   { background-position: 100% 20%, 0% 80%, 0% 0%; }
    50%  { background-position: 0% 70%, 100% 20%, 0% 0%; }
    100% { background-position: 100% 20%, 0% 80%, 0% 0%; }
}

/* GLASS REFLECTION VERTICAL */
@keyframes glassVertical {
    0%   { translate: 0 -5%; }
    50%  { translate: 0 5%; }
    100% { translate: 0 -5%; }
}

/* GLASS ANGLE */
@keyframes glassRotate {
    0%   { rotate: -6deg; }
    50%  { rotate: 5deg; }
    100% { rotate: -4deg; }
}

@media (prefers-reduced-motion: reduce) {
    body,
    body::before,
    body::after {
        animation: none;
    }
}


html {
    min-height: 100%;
}

#invalidPage h1, #invalidPage p {
    color: white;
}

.container {
    max-width: 96%;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

.candidates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.candidate-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    border: 3px solid transparent;
}

.candidate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.candidate-card.selected {
    border-color: #28a745;
}

.candidate-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    background: #e9ecef;
}

.candidate-info {
    padding: 16px;
    text-align: center;
}

.candidate-info h3 {
    font-size: 2rem;
    margin-bottom: 4px;
    color: #1e3c72;
}

.candidate-info p {
    font-size: 1.6rem;
    color: #666;
}

.candidate-info .info-name {
    height: 120px;
    overflow: hidden;
}

.badge {
    display: inline-block;
    background: #1e3c72;
    color: white;
    font-size: 1.4rem;
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 18px;
    max-width: 600px;
    width: 100%;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #1e3c72;
}

.modal p {
    font-size: 1.6rem;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-candidate {
    font-weight: 700;
    color: #1e3c72;
}

.modal-buttons {
    margin-top: 50px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-yes {
    background: #28a745;
    color: white;
}

.btn-yes:hover {
    background: #218838;
}

.btn-cancel {
    background: #e9ecef;
    color: #333;
}

.btn-cancel:hover {
    background: #dee2e6;
}

/* Success / Finished */
.finish-box {
    display: none;
    background: white;
    border-radius: 18px;
    padding: 40px 30px;
    text-align: center;
    max-width: 640px;
    margin: 40px auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.finish-box.show {
    display: block;
}

.finish-box h2 {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 12px;
}

.finish-box p {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.6;
}

.device-info {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    .candidate-img {
        height: 190px;
    }
    .modal {
        padding: 22px 18px;
    }
}
#btn-fullscreen {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 99999;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#btn-fullscreen:hover {
    background: rgba(0, 0, 0, 0.8);
}

#btn-fullscreen:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.selection-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    color: white;
    margin-bottom: 30px;
}

.header-logo {
    width: 100px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.selection-header h1 {
    font-size: 3rem;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0px 20px;
}
.app_range {
    padding-top: 200px;
}