@import url('https://fonts.googleapis.com/css2?family=Modak&display=swap');

/* Base styling */

@import "./styles/base/colours.css"; 

body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100vh;
    background: var(--bg); /*linear-gradient(to bottom right, #2b003a, #361062, #412b80);*/
    overflow: hidden;
    position: relative;
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Ensure column layout for small screens */
    text-align: center; /* Align text in the center for responsiveness */
    color: var(--fg); 
}
#logo {
    position: absolute;
    top:30px;
    left: 30px;
    width: 64px;
    height: 64px;
}
/* Language button at the top right */
.language-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background-color: var(--primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* On top of other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
}

.modal-content {
    background-color: var(--bg);/*white;*/
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    position: relative;
}

.modal-content h2 {
    color: var(--primary); 
}

.modal-content button {
    background-color: var(--primary);
    border-color: var(--primary-accented);
    columns: var(--fg);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Logo positioning */
.logo {
    position: absolute;
    top: 30px;   /* Distance from the top of the screen */
    left: 40px;  /* Distance from the left of the screen */
    width: 50px; /* Adjust the width as needed */
    height: auto; /* Maintain aspect ratio */
    z-index: 10;  /* Ensure it's on top of other elements */
}

/* Falling stars with gradient */
.star {
    position: absolute;
    width: 3px;
    height: 50px; /* Adjust height to create the tail effect */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    animation: fall 2.5s linear infinite;
    opacity: 0.3; /* Add some opacity for a subtle effect */
}

@keyframes fall {
    0% {
        transform: translate(0, 0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(-100vw, 100vh) rotate(45deg);
        opacity: 0;
    }
}

/* Generate random stars with varying delays */
.star:nth-child(1) {
    top: -100px;
    right: 0;
    animation-delay: 0s;
}
.star:nth-child(2) {
    top: -150px;
    right: 10%;
    animation-delay: 1s;
}
.star:nth-child(3) {
    top: -200px;
    right: 20%;
    animation-delay: 2s;
}
.star:nth-child(4) {
    top: -250px;
    right: 30%;
    animation-delay: 3s;
}
.star:nth-child(5) {
    top: -300px;
    right: 40%;
    animation-delay: 0.5s;
}
.star:nth-child(6) {
    bottom: 20px;
    right: 0%;
    top: 20px;
    animation-delay: 0.5s;
}


.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.instructions {
    font-size: 36px;
    color: var(--primary);
}

.splitter {
    padding-top: 30px;
}

.generate-button {
    cursor: pointer;
    background-color: var(--primary); 
    margin: 0px 32px 32px 0px;
    padding: 0px 32px;
    text-decoration: none;
    border: 2px solid var(--primary-accented);
    box-shadow: rgba(255,255,255,0.25) 0px 4px 20px 5px;
    border-radius: 30px;
    height: 48px;
    text-transform: uppercase;
    font-weight: 900;
    font-family: Nunito, sans-serif;
}

/* Card container styling */
.card {
    width: 300px;
    height: 400px;
    perspective: 1000px; /* Perspective for 3D effect */
    margin-top: 20px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Card front styling */
.card-front {
    background-image: url('card_cover.png');
    background-size: cover;
    background-position: center;
}

.card-back {
    background: var(--primary); 
    color: var(--fg);
    transform: rotateY(180deg);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
    backdrop-filter: blur(8px); /* Optional: Adds a subtle blur effect for more depth */
    border-style: outset; 
    border-color: var(--primary-accented);
    border-width: 5px;
}

.card-back .category,
.card-back .situation {
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.4;
}


/* Flipping effect */
.card.flip .card-inner {
    transform: rotateY(180deg);
}




/* stuff to enforce login */ 
#loginOverlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    justify-content: center; 
    align-items: center; 
    z-index: 102;
}

#loginOverlay div {
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); 
    text-align: center; 
    width: 300px;
    color: black; 
}

#access-code {
    width: 100%; 
    margin-bottom: 10px; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px;
    box-sizing: border-box;
}

#submit-access-code-button {
    width: 100%; 
    padding: 10px; 
    background-color: #4285f4; 
    color: white; 
    border: none; 
    border-radius: 4px;
}

#logout-button {
    position: fixed; 
    z-index: 1000; 
    background-color: #cc446699; 
    border-radius: 20%;
    border-color: #cc4466;
    bottom: 20px; 
    right: 20px; 
    font-size: 1em; 
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
    padding: 5px; 
}
#logout-button:hover {
    background-color: #cc4466cc; 
}





#toppart {
    display: flex; 
    gap: 20px; 
}

.logo-img {
    height: 100px;
}



#lightbulb-button {
    position: absolute; 
    top: 10px; 
    right: 10px; 
    font-size: 30px; 
    color: var(--fg);
}

#talking-points-container {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: 105;
}

#talking-points {
    position: absolute; 
    top: calc(50% - 150px); 
    left: calc(50% + 160px); 

    z-index: 106; 

    width: 200px;
    max-height: 300px;
    

    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

    background: var(--primary); 
    color: var(--fg);
}

/*#talking-points h2 {
    margin: 5px 10px; 
    font-family: "Modak", system-ui;
    font-weight: 400;
    font-style: normal;
    animation: glow-in 3s forwards;
}
@keyframes glow-in {
    0% {
        text-shadow: 0 0 0px rgba(255, 255, 255, 0); 
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 1), 
                    0 0 20px rgba(255, 255, 255, 0.8),
                    0 0 30px rgba(255, 255, 255, 0.6);
    }
}*/
#talking-points h2 {
    -webkit-background-clip: text; /* For Webkit browsers like Chrome, Safari */
    background-clip: text;

    margin: 5px 10px; 
    font-family: "Modak", system-ui;
    font-weight: 400;
    font-style: normal;
    color: transparent; 

    animation: reveal-bg 2s ease-in forwards; 
    
}

/*
# NOTE: even setting it to like 5 can be quite obviously not smooth so... 
for p in range(0, 101, 2):
    print('    '+str(p)+'''% {
        background-image: radial-gradient( ellipse '''+str(p*2.5)+'''% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / '''+('{:.3f}'.format(0 if p<=75 else (p-75)/(100-75)))+'''));
    }''')
*/
@keyframes reveal-bg {
    0% {
        background-image: radial-gradient( ellipse 0.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    2% {
        background-image: radial-gradient( ellipse 5.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    4% {
        background-image: radial-gradient( ellipse 10.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    6% {
        background-image: radial-gradient( ellipse 15.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    8% {
        background-image: radial-gradient( ellipse 20.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    10% {
        background-image: radial-gradient( ellipse 25.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    12% {
        background-image: radial-gradient( ellipse 30.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    14% {
        background-image: radial-gradient( ellipse 35.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    16% {
        background-image: radial-gradient( ellipse 40.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    18% {
        background-image: radial-gradient( ellipse 45.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    20% {
        background-image: radial-gradient( ellipse 50.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    22% {
        background-image: radial-gradient( ellipse 55.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    24% {
        background-image: radial-gradient( ellipse 60.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    26% {
        background-image: radial-gradient( ellipse 65.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    28% {
        background-image: radial-gradient( ellipse 70.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    30% {
        background-image: radial-gradient( ellipse 75.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    32% {
        background-image: radial-gradient( ellipse 80.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    34% {
        background-image: radial-gradient( ellipse 85.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    36% {
        background-image: radial-gradient( ellipse 90.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    38% {
        background-image: radial-gradient( ellipse 95.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    40% {
        background-image: radial-gradient( ellipse 100.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    42% {
        background-image: radial-gradient( ellipse 105.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    44% {
        background-image: radial-gradient( ellipse 110.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    46% {
        background-image: radial-gradient( ellipse 115.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    48% {
        background-image: radial-gradient( ellipse 120.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    50% {
        background-image: radial-gradient( ellipse 125.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    52% {
        background-image: radial-gradient( ellipse 130.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    54% {
        background-image: radial-gradient( ellipse 135.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    56% {
        background-image: radial-gradient( ellipse 140.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    58% {
        background-image: radial-gradient( ellipse 145.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    60% {
        background-image: radial-gradient( ellipse 150.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    62% {
        background-image: radial-gradient( ellipse 155.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    64% {
        background-image: radial-gradient( ellipse 160.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    66% {
        background-image: radial-gradient( ellipse 165.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    68% {
        background-image: radial-gradient( ellipse 170.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    70% {
        background-image: radial-gradient( ellipse 175.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    72% {
        background-image: radial-gradient( ellipse 180.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    74% {
        background-image: radial-gradient( ellipse 185.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.000));
    }
    76% {
        background-image: radial-gradient( ellipse 190.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.040));
    }
    78% {
        background-image: radial-gradient( ellipse 195.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.120));
    }
    80% {
        background-image: radial-gradient( ellipse 200.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.200));
    }
    82% {
        background-image: radial-gradient( ellipse 205.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.280));
    }
    84% {
        background-image: radial-gradient( ellipse 210.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.360));
    }
    86% {
        background-image: radial-gradient( ellipse 215.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.440));
    }
    88% {
        background-image: radial-gradient( ellipse 220.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.520));
    }
    90% {
        background-image: radial-gradient( ellipse 225.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.600));
    }
    92% {
        background-image: radial-gradient( ellipse 230.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.680));
    }
    94% {
        background-image: radial-gradient( ellipse 235.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.760));
    }
    96% {
        background-image: radial-gradient( ellipse 240.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.840));
    }
    98% {
        background-image: radial-gradient( ellipse 245.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 0.920));
    }
    100% {
        background-image: radial-gradient( ellipse 250.0% 80% at 0% 50%, var(--fg),  hsl(from var(--fg) h s l / 1.000));
    }
}

#talking-points p {
    margin: 5px; 
    font-size: 0.85rem; 
    text-align: start;
}
