/* --- CAMADA 1: FACHADA --- */
#facade-container {
    position: absolute; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    z-index: 10; transition: all 1s ease;
    background: url('../assets/pink_bg/image.png') center/cover;
    overflow: hidden;
}

.sparkle, .heart {
    position: absolute;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    animation: float-and-fade 5s linear infinite;
}

@keyframes float-and-fade {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1.2);
        opacity: 0;
    }
}

.heart-border {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    pointer-events: none;
    z-index: 1;
}

.heart-border i {
    position: absolute;
    color: #ff6b81;
    animation: animate-hearts 2s linear infinite;
}

@keyframes animate-hearts {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

.heart-card {
    font-family: 'Comic Sans MS', 'Chalkduster', 'cursive';
    color: #5d0f24;
    text-align: center;
    background: linear-gradient(145deg, #ff9a9e 0%, #fad0c4 100%);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 
                inset 0 -10px 20px rgba(0, 0, 0, 0.1);
    border: 10px solid;
    border-image-slice: 1;
    border-width: 10px;
    border-image-source: linear-gradient(to left, #f8a5c2, #f7cdb9);
    width: 450px;
    position: relative;
    overflow: visible;
    transform-style: preserve-3d;
}

.heart-card::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    border-radius: 15px 15px 0 0;
    pointer-events: none;
}




/* Add more icons as needed */
.hat-icon {
    position: absolute;
    width: 50px; /* Adjust size as needed */
    height: 50px;
    opacity: 0.2;
    /* background-image: url('path/to/hat.svg'); */ /* Add your SVG path here */
}

.hat-icon-1 { top: 20%; left: 80%; }
.hat-icon-2 { top: 70%; left: 15%; }

.title-container {
    position: relative;
    margin-bottom: 1rem;
}

.main-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 0 #ccc, 
                 0 2px 0 #c9c9c9,
                 0 3px 0 #bbb,
                 0 4px 0 #b9b9b9,
                 0 5px 0 #aaa,
                 0 6px 1px rgba(0,0,0,.1),
                 0 0 5px rgba(0,0,0,.1),
                 0 1px 3px rgba(0,0,0,.3),
                 0 3px 5px rgba(0,0,0,.2),
                 0 5px 10px rgba(0,0,0,.25),
                 0 10px 10px rgba(0,0,0,.2),
                 0 20px 20px rgba(0,0,0,.15);
    animation: bounce 1s infinite alternate, glitter 2s infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes glitter {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}


@keyframes bounce {
    to {
        transform: translateY(-10px);
    }
}

.sparkles::before,
.sparkles::after {
    content: '\f005'; /* Font Awesome star icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: sparkle 2s infinite;
    color: #ffeb3b;
}

.sparkles::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.5s;
}

.sparkles::after {
    top: 0;
    left: 20%;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}

.title-container h2 {
    font-size: 1.2rem;
    margin: 0;
    color: #d63031;
}

.title-container::before,
.title-container::after {
    content: '\f004'; /* Font Awesome heart icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: heart-float 3s infinite;
    color: #ff6b81;
}

.title-container::before {
    top: -30px;
    left: 10%;
    animation-delay: 0.2s;
}

.title-container::after {
    top: -10px;
    right: 10%;
    animation-delay: 1.2s;
}

@keyframes heart-float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.system-failure { animation: collapseToSingularity 1.5s forwards cubic-bezier(0.7, 0, 0.84, 0); }
@keyframes collapseToSingularity {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    40% { transform: translate(10px, -10px); filter: contrast(200%) invert(1); }
    100% { transform: scale(0.001) rotate(360deg); opacity: 0; }
}
.inputs-area { display: flex; gap: 20px; margin: 20px 0; justify-content: center; }
.love-input {
    padding: 15px;
    border: 2px solid #ff8fab;
    border-radius: 15px;
    outline: none;
    text-align: center;
    width: 160px;
    background: linear-gradient(to bottom, #ffffff 0%, #fde0e0 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 10px #ff8fab;
    font-family: 'Comic Sans MS', 'Chalkduster', 'cursive';
    font-size: 1rem;
    color: #d63031;
    transition: all 0.3s;
}

.love-input:focus {
    box-shadow: 0 0 15px #ff8fab, inset 0 2px 5px rgba(0,0,0,0.2);
    transform: scale(1.02);
}

.love-btn {
    background: linear-gradient(to bottom, #ff8fab 0%, #fb6b90 100%);
    color: white;
    border: 2px solid #ffc2d1;
    padding: 15px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.3rem;
    font-family: 'Comic Sans MS', 'Chalkduster', 'cursive';
    text-shadow: 0 -1px 1px rgba(0,0,0,0.2);
    box-shadow: 0 5px 10px rgba(251, 107, 144, 0.5),
                inset 0 -5px 10px rgba(255,255,255,0.4);
    transition: all 0.2s;
    position: relative;
}

.love-btn:hover {
    background: linear-gradient(to bottom, #ff9ac0 0%, #fb7ba0 100%);
    box-shadow: 0 8px 15px rgba(251, 107, 144, 0.6),
                inset 0 -5px 15px rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.love-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(251, 107, 144, 0.6),
                inset 0 -3px 10px rgba(0,0,0,0.2);
}

.thermometer {
    width: 100%;
    height: 25px;
    background: #fff;
    border-radius: 25px;
    margin-top: 25px;
    border: 3px solid #f8a5c2;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.mercury {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #ff9a9e, #ff6b81);
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.5);
    transition: width 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.floating-heart {
    position: absolute;
    bottom: 5px;
    color: white;
    font-size: 1rem;
    opacity: 0.7;
    animation: float-up 4s ease-out forwards;
    pointer-events: none;
}

@keyframes float-up {
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* --- CAMADA 2: TERMINAL SYSTEM --- */
#hidden-system {
    position: absolute; width: 100%; height: 100%; z-index: 5;
    opacity: 0; pointer-events: none;
    display: flex; justify-content: center; align-items: center;
    transform: scale(1.1); transition: opacity 2s ease 1s, transform 0.2s;
    background: rgba(0,0,0,0.5);
}
.system-active { opacity: 1 !important; pointer-events: all !important; transform: scale(1) !important; }

.terminal-window-container {
    width: 80%; max-width: 800px; height: 70%;
    overflow-y: auto;
}
.term-input {
    background: transparent; border: none; color: var(--amber);
    font-family: 'VT323', monospace; font-size: 1.5rem;
    outline: none; width: 80%; text-shadow: 0 0 5px var(--amber); text-transform: uppercase;
}

/* --- CAMADA 3: WAV2PNG --- */
#wav2png-layer {
    display: none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 30;
    background: radial-gradient(circle,#222 0%,#000 90%);
}
.w2p-container {
    position:relative; width:100%; height:100%; display:flex; flex-direction:column;
    justify-content:center; align-items:center; z-index:1;
}
#s { font-size:2rem; margin-bottom:1rem; letter-spacing:2px; }
.blink { animation:blinker 1s linear infinite; }
#v { width:100%; height:100%; position:absolute; top:0; left:0; opacity:.6; pointer-events:none; }
#f, #p { display:none; }
.sub { font-size:1rem; opacity:.7; }
#d {
    margin-top:20px; background:0 0; border:1px solid var(--amber); color:var(--amber);
    padding:10px 20px; font-family:'VT323',monospace; font-size:1.5rem; cursor:pointer;
    text-shadow:0 0 5px var(--amber); display:none; z-index:5;
}
#d:hover { background:var(--amber); color:#000; }

/* --- CAMADA 4: MAIL --- */
.tool-layer {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    background: radial-gradient(circle, #222 0%, #000 90%);
    box-sizing: border-box; /* Garante que padding e border não alterem o tamanho final */
    padding: 2%; /* Adiciona um respiro nas bordas */
}

.controls-container {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: 1px solid var(--amber);
    color: var(--amber);
    padding: 10px 15px;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    text-shadow: 0 0 8px var(--amber);
    box-shadow: 0 0 15px var(--amber-dim) inset, 0 0 10px var(--amber);
    outline: none;
}

.search-button {
    background: transparent;
    border: 1px solid var(--amber);
    color: var(--amber);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5rem;
    text-shadow: 0 0 8px var(--amber);
    transition: all 0.2s;
    box-shadow: 0 0 10px var(--amber);
}

.search-button:hover {
    background: var(--amber);
    color: #000;
    box-shadow: 0 0 25px var(--amber);
}

#mail-layout, #anomalies-layout {
    display: flex;
    width: 96%;
    height: calc(100% - 70px); /* Adjusted height */
    margin: 0;
}

#mail-list, #anomalies-list {
    width: 30%;
    border-right: 2px solid var(--amber);
    overflow-y: auto;
    box-shadow: inset -10px 0 20px -10px var(--amber-dim);
}

#anomalies-list {
    width: 30%;
}

.list-item {
    font-size: rem;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 176, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-item:hover {
    background: rgba(255, 176, 0, 0.1);
}

.list-item.active {
    background: rgba(255, 176, 0, 0.2);
    box-shadow: inset 3px 0 0 #ffb000;
}

#mail-content, #anomalies-content {
    padding: 20px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
}

#anomalies-content {
    width: 70%;
    background: rgba(10, 0, 0, 0.4);
}

#mail-content {
    width: 70%;
}

.md-h1 { font-size: 2rem; border-bottom: 1px double var(--amber); margin-bottom: 10px; }
.md-bold { font-weight: bold; color: #fff; text-shadow: 0 0 10px var(--amber); }
.md-quote { border-left: 3px solid var(--amber); padding-left: 10px; font-style: italic; opacity: 0.8; }
.mail-header-info { border-bottom: 1px solid var(--amber); padding-bottom: 10px; margin-bottom: 20px; }

.dithered-image {
    filter: url(#quantize);
}

/* --- CAMADA 5: PONG --- */
#pong-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
canvas#pongCanvas { border: 2px solid var(--amber); box-shadow: 0 0 20px var(--amber); }
#score-board {
    position: absolute; top: 20%; text-align: center; display: none; z-index: 40;
}
.highscore-entry { display: flex; justify-content: space-between; gap: 40px; font-size: 1.5rem; margin: 5px 0;}
.glitch-text { animation: blinker 0.2s infinite; color: var(--amber-dim); }

.exit-hint { position: fixed; bottom: 20px; right: 20px; opacity: 0.7; font-size: 1rem; text-shadow: 0 0 5px var(--amber); z-index: 100;}

.audio-container {
    border: 1px solid var(--amber);
    padding: 15px;
    margin: 15px 0;
    background: #000;
    box-shadow: 0 0 15px var(--amber-dim) inset;
    border-radius: 0;
}

audio {
    width: 100%;
    display: none;
}

.spectrogram {
    border-top: 1px solid var(--amber);
    margin-top: 10px;
    padding-top: 10px;
    background: #000;
    border-bottom: 1px solid var(--amber-dim);
    cursor: pointer;
    cursor: pointer;
}

.custom-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
    padding: 5px;
    background: #111;
}

.play-pause-btn {
    background: transparent;
    border: none;
    color: var(--amber);
    font-size: 1.5rem;
    cursor: pointer;
    text-shadow: 0 0 5px var(--amber);
    padding: 5px 10px;
}

.time-display {
    font-size: 1rem;
    color: var(--amber);
    flex-grow: 1;
    text-align: right;
}

/* --- SCROLLBARS --- */
::-webkit-scrollbar {
    width: 12px;
    background-color: #111;
}

::-webkit-scrollbar-track {
    background-color: #1a1a1a;
    border-left: 1px solid var(--amber-dim);
}

::-webkit-scrollbar-thumb {
    background-color: var(--amber);
    border-radius: 0;
    box-shadow: 0 0 10px var(--amber);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ffcf40;
}

::-webkit-scrollbar-corner {
    background-color: #111;
}

/* --- CAMADA 6: TIMELINE --- */
#timeline-layer {
    width:100%;
    justify-content: center;
    align-items: center;
}

#timeline-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#timeline {
    position: relative;
    width: 1vw;
    height: 5px;
    background: var(--amber);
    box-shadow: 0 0 15px var(--amber);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-year {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--amber);
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--amber);
}

.timeline-year:hover {
    transform: translateX(-50%) scale(1.5);
    box-shadow: 0 0 25px var(--amber);
}

.timeline-year.locked {
    background: var(--amber-dim);
    cursor: not-allowed;
    box-shadow: none;
}

#tooltip {
    position: absolute;
    background: #000;
    color: var(--amber);
    border: 1px solid var(--amber);
    padding: 5px 10px;
    border-radius: 0;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 10px var(--amber);
    text-shadow: 0 0 5px var(--amber);
}

#timeline-details-view {
    position: absolute;
    width: 70%;
    height: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    padding: 20px;
    overflow-y: auto;
}

#timeline-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 1px solid var(--amber);
    color: var(--amber);
    padding: 5px 10px;
    cursor: pointer;
}