* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(233,5,160,0.35), transparent 35%),
        radial-gradient(circle at bottom right, rgba(77,189,226,0.30), transparent 35%),
        #10083A;
    color: white;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.experience-screen {
    min-height: 100vh;
    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-area img {
    max-width: 360px;
    margin-bottom: 45px;
}

.hero-content {
    max-width: 950px;
    text-align: center;
    padding: 55px;
    border-radius: 36px;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(77,189,226,0.65);
    box-shadow:
        0 0 35px rgba(77,189,226,0.35),
        0 0 55px rgba(233,5,160,0.18);
}

.kicker {
    color: #77f17a;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 18px;
}

h1 {
    margin: 0;
    font-size: 64px;
    color: #E905A0;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(233,5,160,0.55);
}

p {
    font-size: 26px;
    color: #ddd;
    line-height: 1.45;
    margin: 30px 0 45px;
}

.start-button {
    display: inline-block;
    padding: 24px 52px;
    border-radius: 22px;
    background: #77f17a;
    color: #10083A;
    text-decoration: none;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 0 24px rgba(119,241,122,0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-button:active {
    transform: scale(0.96);
    box-shadow: 0 0 12px rgba(119,241,122,0.35);
}

.search-screen {
    justify-content: flex-start;
    padding-top: 35px;
}

.small-logo img {
    max-width: 260px;
    margin-bottom: 20px;
}

.search-content {
    width: 100%;
    max-width: 1150px;
    padding: 38px;
}

.search-content h1 {
    font-size: 48px;
    margin-bottom: 28px;
}

.team-search-input {
    width: 100%;
    padding: 24px 28px;
    border-radius: 22px;
    border: 3px solid #4DBDE2;
    background: rgba(255,255,255,0.10);
    color: white;
    font-size: 30px;
    outline: none;
    margin-bottom: 30px;
}

.team-search-input::placeholder {
    color: rgba(255,255,255,0.65);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
}

.team-card-v2 {
    display: block;
    padding: 24px;
    border-radius: 22px;
    text-decoration: none;
    color: white;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(233,5,160,0.75);
    box-shadow: 0 0 18px rgba(233,5,160,0.25);
}

.team-card-v2:active {
    transform: scale(0.97);
}

.team-name-v2 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 10px;
    color: #77f17a;
    text-transform: uppercase;
}

.team-meta-v2 {
    font-size: 19px;
    color: #ddd;
}

.secondary-button {
    display: inline-block;
    margin-top: 28px;
    padding: 16px 28px;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
}

.empty-message {
    font-size: 28px;
    color: #ddd;
    margin: 40px 0;
}

.confirm-screen {
    justify-content: flex-start;
    padding-top: 35px;
}

.confirm-content {
    max-width: 980px;
}

.confirm-score {
    margin: 28px 0;
    font-size: 72px;
    font-weight: 900;
    color: #E905A0;
    text-shadow: 0 0 22px rgba(233,5,160,0.55);
}

.confirm-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 30px 0;
}

.confirm-details div {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 24px;
    font-weight: bold;
    color: #4DBDE2;
}

.confirm-question {
    margin: 35px 0 25px;
    font-size: 30px;
    color: #77f17a;
    font-weight: 900;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.confirm-actions .secondary-button {
    background: rgba(255,255,255,0.18);
}

.back-link {
    margin-top: 24px;
}

.capture-screen {
    justify-content: flex-start;
    padding-top: 25px;
}

.capture-content {
    max-width: 1050px;
    padding: 34px;
}

.capture-content h1 {
    font-size: 44px;
    margin-bottom: 24px;
}

.camera-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    border: 3px solid #E905A0;
    box-shadow: 0 0 30px rgba(233,5,160,0.45);
    background: #000;
}

video,
canvas {
    width: 100%;
    display: block;
}

canvas {
    display: none;
}

.countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 190px;
    font-weight: 900;
    color: #77f17a;
    background: rgba(16,8,58,0.45);
    text-shadow: 0 0 35px rgba(119,241,122,0.85);
}

.hidden {
    display: none !important;
}

.capture-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

button.start-button,
button.secondary-button {
    border: none;
    cursor: pointer;
}

.processing-content {
    max-width: 900px;
}

.loader-bar {
    width: 100%;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
    margin: 40px 0;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E905A0, #4DBDE2, #77f17a);
    animation: loadingProgress 2s ease forwards;
}

@keyframes loadingProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.success-content {
    max-width: 900px;
    padding: 38px;
}

.success-content h1 {
    font-size: 52px;
}

.success-team {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin: 24px 0;
}

.success-team span {
    color: #E905A0;
}

.qr-premium {
    display: inline-block;
    padding: 24px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 0 35px rgba(119,241,122,0.45);
}

.qr-premium img {
    width: 360px;
    height: 360px;
    display: block;
}

.scan-message{

    margin-top:25px;

    font-size:28px;

    color:white;

    line-height:1.4;

}

.share-message{

    margin-top:35px;

    font-size:34px;

    font-weight:900;

    color:#77F17A;

    text-shadow:0 0 18px rgba(119,241,122,.45);

}

.countdown-return{

    margin-top:40px;

    font-size:24px;

    color:#4DBDE2;

}

#countdownValue{

    font-size:48px;

    font-weight:bold;

    color:#E905A0;

}

.screensaver {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(233,5,160,0.35), transparent 35%),
        radial-gradient(circle at bottom right, rgba(77,189,226,0.30), transparent 35%),
        #10083A;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}

.screensaver-content {
    max-width: 1000px;
    padding: 60px;
}

.screensaver-icon {
    font-size: 90px;
    margin-bottom: 20px;
}

.screensaver h1 {
    font-size: 72px;
    color: #E905A0;
    text-transform: uppercase;
    text-shadow: 0 0 25px rgba(233,5,160,0.55);
    margin-bottom: 45px;
}

.screensaver-lines {
    display: grid;
    gap: 24px;
    font-size: 34px;
    color: white;
    font-weight: bold;
}

.screensaver-lines div {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(77,189,226,0.45);
}

.tap-message {
    margin-top: 55px;
    font-size: 36px;
    color: #77F17A;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(119,241,122,0.45);
}

.processing-messages {
    margin-top: 28px;
    min-height: 48px;
    text-align: center;
}

#processingMessage {
    font-size: 26px;
    font-weight: 900;
    color: #77F17A;
    transition: opacity 0.25s ease;
}

/* =========================================================
   PHOTOBOOTH - FIT SCREEN
   ========================================================= */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
}

/* Pages principales */

.search-screen,
.confirm-screen,
.capture-screen {
    width: 100%;
    height: 100vh;
    height: 100dvh;

    padding: 18px 28px;

    overflow: hidden;
}

/* Contenus */

.search-content,
.confirm-content,
.capture-content {
    width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

/* Logo */

.small-logo img {
    max-height: 90px;
    width: auto;
    margin-bottom: 8px;
}

/* Titres */

.search-content h1,
.confirm-content h1,
.capture-content h1 {
    margin: 6px 0 12px;
    font-size: clamp(26px, 3vh, 42px);
}

/* SEARCH */

.team-search-input {
    margin-bottom: 12px;
}

.team-grid {
    gap: 12px;
}

/* CONFIRM */

.confirm-details {
    gap: 10px;
    margin: 12px 0;
}

/* CAPTURE */

.camera-wrapper {
    height: auto;
    max-height: 52vh;
    aspect-ratio: 16 / 9;
    margin: 8px auto;
}

.camera-wrapper video,
.camera-wrapper canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.capture-actions {
    margin-top: 10px;
    gap: 10px;
}

.capture-screen .gil-photo-card {
    height: auto;
    max-height: 52vh;
}