body {
    font-family: 'Georgia', serif; /* More elegant font */
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}
.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow */
}
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
    .summary-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .summary-content p {
        margin-right: 0;
        margin-bottom: 20px;
    }
    .summary-img {
        max-width: 100%;
        margin: 0 auto;
    }
}
header {
    background: linear-gradient(to right, #333, transparent), url('../imgs/header.jpeg') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #77aaff 3px solid;
    border-radius: 10px 10px 0 0; /* Rounded top corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow */
    position: relative;
}
.header-content {
    position: relative;
    z-index: 1;
}
header h1, header ul {
    text-shadow: 2px 2px 4px #000; /* Black shadow */
}
header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}
header ul {
    padding: 0;
    list-style: none;
}
header li {
    display: inline;
    padding: 0 20px 0 20px;
}
.main-content {
    padding: 20px;
    background: #fff;
    margin-top: 20px;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow */
}
.main-content h1 {
    text-align: center;
}
.summary {
    margin: 20px 0;
}
.summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-content p {
    flex: 1;
    margin-right: 20px;
}

.summary-img {
    max-width: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.card {
    position: relative;
    /* height: 50px; */
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 1s ease; /* Updated to 1 second for all transitions */
    background: #fff;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: auto; /* Let the card adjust to content */
}

.card .background {
    position: absolute; /* Changed from fixed to absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(1px); /* Decreased blur from 2px to 1px */
    opacity: 0.7;
    z-index: 0; /* Ensure background is behind content */
    transition: transform 0.3s ease; /* Ensure smooth transition */
}

@media (max-width: 768px) {
    .card .background {
        background-attachment: scroll; /* Ensure background image scrolls with content */
    }
}

@media (max-width: 480px) {
    .card .background {
        background-attachment: scroll; /* Ensure background image scrolls with content */
    }
    .card {
        min-height: 200px; /* Ensure enough space for background on mobile */
    }
    .card .background {
        transform: none !important; /* Disable background transform on small screens */
        background-attachment: scroll !important;
    }
}

@media (max-width: 480px) {
    .card {
        min-height: 200px !important;
        overflow: visible !important;
    }
    .card .background {
        z-index: -1 !important;
        transform: none !important;
        background-attachment: scroll !important;
    }
    .card .content {
        z-index: 0 !important;
    }
}

@media (max-width: 480px) {
    .card .background {
        z-index: 0 !important; /* Ensure it's not hidden behind the body */
    }
    .card .background {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        position: absolute !important;
        z-index: 0 !important;
    }
}

.card .content {
    position: relative;
    z-index: 1; /* Ensure content is above background */
    background: rgba(255, 255, 255, 0.6);
    padding: 0; /* Remove padding */
    height: 100%;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.card:hover .background {
    transform: none; /* Ensure background does not move on hover */
}

.card:hover .content h3 {
    transform: scale(1.1);
    font-size: 1.2em;
    letter-spacing: 0.1em; /* Add letter spacing when hovering */
}

.card:hover {
    height: 80px; /* Expand height when hovering */
    transform: translateY(-10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card-content {
    text-align: center;
}

.card-content h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.card.dimmed {
    filter: brightness(0.7) blur(2px); /* Darker and blurry */
    transition: filter 1s ease; /* Specific transition for dimming effect */
}

.card.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    z-index: 1000;
    transition: all 0.5s ease;
}
.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: transform 0.3s;
    filter: blur(2px); /* Less blur */
    opacity: 0.5; /* Slightly opaque */
}
.card:hover {
    transform: scale(1.05); /* Slightly larger */
}
.iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Opaque grey */
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}
.card-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1; /* Ensure it stays within the card */
    transform: translateY(0);
    transition: transform 0.3s;
}
.card a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #000; /* Always black */
    transition: color 0.3s, font-size 0.3s;
    position: relative;
    z-index: 1;
}
.card a:hover {
    color: #000; /* Always black */
    font-size: 1.1em; /* Slightly larger text */
}
.card.dimmed {
    filter: brightness(0.7) blur(2px); /* Darker and blurry */
}
.card.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transform: scale(1);
    transition: transform 1s, width 1s, height 1s;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-left: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

body.mystery-mode {
    background-color: black;
    cursor: none;
}

body.mystery-mode * {
    color: black;
}

body.mystery-mode .flashlight {
    position: fixed;
    width: 115px; /* Increased size by 15% */
    height: 115px; /* Increased size by 15% */
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 0.95) 70%); /* Fade to the same shade as the overlay */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.98); /* Darker background */
    mix-blend-mode: multiply;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: black; }
}

.typewriter-container {
    width: 100%;
    overflow: hidden;
    white-space: pre-wrap; /* Allow text to wrap */
}

.typewriter-text {
    display: inline-block;
    white-space: pre-wrap; /* Allow text to wrap */
}
