@font-face {
    font-family: 'OrangeSquash';
    src: url('../fonts/Orange-Squash-Regular.otf') format('opentype');
}
@font-face {
    font-family: 'MessinaSans';
    src: url('../fonts/MessinaSans-Book.otf') format('opentype');
}

html, body {
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;    
    margin: 0;
    background-color: #FFF9EF;
}

.hooja-stats {
    background-color: #000000 !important;
}

a {
    color: #AF524B;
}

#main-conent {
    
}

.content-width {
    width: 100%;
}

#hero {
  position: relative;
  width: 100%;
  height: 60vh;
  margin: 0 auto;
}

@media (max-width:500px) {
    #hero {
      max-width: 700px;
    }
}

#hero iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
}

#main-content {
    
}

#region-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px;
}

#region-select h1 {
    margin: 0;
    font-family: 'OrangeSquash', sans-serif;
    color: #1E546D;
    text-align: center;
    font-size: 2em;
}

#region-select h2 {
    margin: 15px 0;
    font-family: 'OrangeSquash', sans-serif;
    color: #1E546D;
    font-size: 2em;
    text-align: center;
}

#region-select p{
    margin: 15px 0;
    font-family: 'MessinaSans', sans-serif;
    color: #2E2926;
    font-size: 1.2em;
    text-align: center;
}

#region-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.region-btn {
    background: #E4DBC8;
    padding: 5px 10px;
    width: fit-content;
    border: solid 2px #DCCC80;
    border-radius: 20px;
    font-family: 'MessinaSans', sans-serif;
    color: #2E2926;
    font-size: 0.9em;
    cursor: pointer;
}

.region-btn.selected {
    background: #DCCC80;
    color: #2E2926;
}

#full-glas {
    z-index: 2;
}

#full-glas h2 {
    margin: 0;
}

@keyframes pulsate {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

#full-glas.active {
    animation: pulsate 1s ease-in-out infinite;
}

#empty-glas {
    z-index: 2;
}

.glas-img {
    height: auto;
    width: 350px;
    object-fit: contain;
    z-index: 2;
}

.elipse {
    position: absolute;
    background-image: url(../images/Ellipse.svg);
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 400px auto;
    z-index: 1;
    bottom: 0;
    width: 100%;
}

#vote {
    position: absolute;
    top: 21%;
    left: 36%;
    display: block;
    height: 185px;
    width: 200px;
    background: transparent;
    z-index: 3;
    cursor: not-allowed;
    border: none;
}

#vote:not([disabled]) {
    cursor: pointer;
}

.glas {
    position: relative;
    height: 300px;
    width: 100%;
    transition: transform 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 20px;
}


#thank-you {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#thank-you h1 {
    margin: 0;
    font-family: 'OrangeSquash', sans-serif;
    color: #1E546D;
    text-align: center;
}

#thank-you h2 {
    margin: 0;
    font-family: 'OrangeSquash', sans-serif;
    color: #1E546D;
    font-size: 2em;
    text-align: center;
}

#thank-you p{
    margin: 8px 0;
    font-family: 'MessinaSans', sans-serif;
    color: #0A004A;
    text-align: center;
}

.vinstkit {
    min-width: 200px;
    width: 50%;
    height: auto;
    object-fit: contain;
    display: block;
}

#bottom {
    display: flex;
    justify-content: center;
    width: 100%;
    background: black;
}

.fridge-text {
    color: white;
    margin: 0;
    font-family: Arial, sans-serif;
    /* font-weight: 400; */
    font-style: normal;
    position: absolute;
    top: 30%;
    left: 50%;
    z-index: 5;
    transform: rotate(5deg);
}

#bottom-content {
    background-image: url(../images/Bottenbild2.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 500px;
    width: 1200px;
    position: relative;
}

#gauge-wrap {
    position: absolute;
    height: 20%;
    width: 10.5%;
    right: 37%;
    top: 43%;
    transform: rotateX(-5deg) rotateY(16deg) skew(-1deg, 2deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: flicker 5s infinite;
            /* CRT glow */
        box-shadow: 
            inset 0 0 20px rgba(0, 0, 0, 0.8),
            inset 0 0 6px rgba(255, 255, 255, 0.05),
            0 0 8px rgba(100, 100, 255, 0.2);
    
        /* Slight green/blue tint like old phosphor screens */
        background: radial-gradient(ellipse at center, #1e2a1e 0%, #0a0a0a 100%);
    
        /* Scanlines overlay */
        background-image: 
            radial-gradient(ellipse at center, #1e2a1e 0%, #0a0a0a 100%),
            repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0, 0, 0, 0.3) 2px,
                rgba(0, 0, 0, 0.3) 4px
            );
        background-blend-mode: normal;
}

@keyframes flicker {
    0%   { opacity: 1; }
    92%  { opacity: 1; }
    93%  { opacity: 0.85; }
    94%  { opacity: 1; }
    98%  { opacity: 1; }
    99%  { opacity: 0.9; }
    100% { opacity: 1; }
}

#gauge-svg {
    height: 80%;
}

#gauge-latest {
    color: #c3c3c3;
    margin: 0;
    font-family: Arial;
    font-style: normal;
    font-size: 0.85em;
}

.thank-you-form {
    display: flex;
    align-items: center;
    gap: 0px;
    min-width: 70%;
    flex-direction: column;
}

.thank-you-form input[type="email"] {
    width: 100%;
    padding: 10px 20px;
    border: solid 2px #0A004A;
    border-radius: 20px;
    font-family: 'MessinaSans', sans-serif;
    font-size: 1em;
    color: #0A004A;
    box-sizing: border-box;
}

.thank-you-form button[type="submit"] {
    background: #D4E0F5;
    color: #0A004A;
    padding: 10px 30px;
    border: solid 2px #0A004A;
    border-radius: 20px;
    font-family: 'MessinaSans', sans-serif;
    font-size: 1em;
    cursor: pointer;
}

.form-fields {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
}

#form-success p {
    font-family: 'MessinaSans', sans-serif;
    color: #0A004A;
    text-align: center;
}

#thank-you-form .legal-text {
    font-size: 14px !important;
}

@media (max-width: 1200px) {
    #bottom {
        display: flex;
        justify-content: center;
        width: 1200px;
    }
}

@media (min-width: 900px) {
    #hero iframe {

    }
    
    #main-content {
        width: 900px;
    }
    
    #bottom-content {
        height: 470px;
        position: relative;
        perspective: 800px;
    }
    
    #gauge-wrap {
        top: 46%;
    }
}

@media (max-width: 500px) {

    #bottom-content {
        background-position: -115px;
    }
    
    #region-select {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 5%;
    }
    
    #thank-you {
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 20px 5%;
    }
    
    #gauge-wrap {
        right: 46.5%;
        top: 27%;
        box-shadow: black 0 0 0px 1px;    
    }
}

/* Stats för Hooja */
    
#gauge-wrap-stats {
    position: relative;
    background: black;
    transform: rotateX(-5deg) rotateY(7deg) skew(-1deg, 1deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: black 0 0 0px 1px;
    
    /* CRT glow */
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        inset 0 0 6px rgba(255, 255, 255, 0.05),
        0 0 8px rgba(100, 100, 255, 0.2);

    /* Slight green/blue tint like old phosphor screens */
    background: radial-gradient(ellipse at center, #1e2a1e 0%, #0a0a0a 100%);

    /* Scanlines overlay */
    background-image: 
        radial-gradient(ellipse at center, #1e2a1e 0%, #0a0a0a 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.3) 2px,
            rgba(0, 0, 0, 0.3) 4px
        );
    background-blend-mode: normal;
    width: 50%;
    height: fit-content;
}

@keyframes flicker {
    0%   { opacity: 1; }
    92%  { opacity: 1; }
    93%  { opacity: 0.85; }
    94%  { opacity: 1; }
    98%  { opacity: 1; }
    99%  { opacity: 0.9; }
    100% { opacity: 1; }
}

#gauge-wrap-stats {
    animation: flicker 5s infinite;
}

#gauge-wrap-stats #gauge-svg {
    height: fit-content;
}

#gauge-wrap-stats #gauge-latest {
    color: white;
    margin: 0;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.8em;
}

.stats-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: black;
}

.stats-wrap h1{
    font-size: 2em;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    margin: 0;
}

.stats-wrap h2 {
    font-size: 1.4em;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
}

.stat-cards {
    display: flex;
    gap: 1rem;
}

.stat-card {
    flex: 1;
    padding: 10px;
    text-align: center;
    color: white;
    margin: 0;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2em;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2em;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
}
th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #333;
}
th { color: #aaa; font-weight: normal; }
.bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 10px;
}
.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.bar-label {
    width: 140px;
    text-align: right;
    flex-shrink: 0;
    font-size: 1.2em;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
}
.bar-track {
    flex: 1;
    background: #222;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgb(0,243,255), rgba(255,243,0,1), rgba(253,29,29,1));
    border-radius: 4px;
    transition: width 0.6s ease;
}
.bar-count {
    width: 50px;
    font-size: 1.2em;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
}
.logout { text-align: right; font-size: 0.85rem; }
.logout a { color: #aaa; }

[hidden] { display: none !important; }

.gauge-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: transparent;   /* set a colour here if you want it visible */
    cursor: pointer;
}

.gauge-overlay.is-hidden {
    display: none;
}

/* while expanding, keep contents centred and kill the 3D tilt cleanly */
#gauge-wrap.is-expanding {
    justify-content: center;
    animation: none;
}

.charts {
    display: flex;
    flex-wrap: wrap;
}

.bar-chart {
    width: 50%;
}

.header-stats {
    display: flex;
    justify-content: space-evenly;
}

.participants {
    display:none;
}

@media (max-width:1100px) {
    .bar-chart {
        width: 100%;
    }
    
    #gauge-wrap-stats {
        width: 100%;
    }
    
    #gauge-wrap-stats #gauge-latest {
        color: white;
        margin: 0;
        font-family: Arial, sans-serif;
        font-weight: 400;
        font-style: normal;
        font-size: 1.4em;
    }
}

