html {
    overflow: hidden;
}
:root {
    --lavender-base: #b487bf;
    --lavender-shadow: #736199;
    --lavender-deep: #5b4b7a;
    --lavender-highlight: #b6a7d8;
    --silver-light: #f4f4f4;
    --silver-mid: #d6d6d6;
    --silver-dark: #a8a8a8;
    --screen-green: #9fb589;
    --screen-dark: #2a3320;
    --screen-bezel: #111111;
    --bg-color: #090d13;
}


.press-start-2p-regular {
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
}

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  overflow: hidden;
}

/* ---------------- HARDWARE BODY ---------------- */
.phone {
    scale:0.90;
    position: relative;
    width: 310px;
    height: 660px; /* Slightly taller to give bottom buttons breathing room */
    
    /* Subtle gradient to simulate curved plastic body */
    background: linear-gradient(100deg, var(--lavender-highlight) 0%, var(--lavender-base) 20%, var(--lavender-base) 80%, var(--lavender-shadow) 100%);
    
    border-radius: 120px 120px 80px 90px / 70px 70px 150px 150px;
    
    /* Complex shadows to create the casing seam and thickness */
    box-shadow: 
        inset -8px -8px 20px rgba(0,0,0,0.15), /* Right inner curve */
        inset 8px 8px 20px rgba(255,255,255,0.25), /* Left inner curve */
        0 0 0 2px var(--lavender-deep), /* The physical seam gap */
        1px 2px 16px 4px var(--lavender-shadow), /* The back casing peaking out */
        15px 25px 40px rgba(0,0,0,0.5); /* Master drop shadow */
        
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px 45px 15px; /* Increased bottom padding to 45px */
    box-sizing: border-box;
}

/* Hardware Details */
.top-jack {
    position: absolute;
    top: -2px;
    width: 15px;
    height: 6px;
    background: #111;
    border-radius: 0 0 10px 10px;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.9);
}

.side-button {
    position: absolute;
    background: var(--lavender-shadow);
    border: 1px solid var(--lavender-deep);
}

.volume-rocker {
    left: -5px;
    top: 140px;
    width: 5px;
    height: 60px;
    border-radius: 4px 0 0 4px;
    box-shadow: inset 2px 0 3px rgba(255,255,255,0.2), -2px 2px 4px rgba(0,0,0,0.3);
}

.power-button {
    right: -4px;
    top: 180px;
    width: 4px;
    height: 30px;
    border-radius: 0 4px 4px 0;
    box-shadow: inset -1px 0 2px rgba(255,255,255,0.2), 2px 2px 4px rgba(0,0,0,0.3);
}

.earpiece-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    margin-top: 5px;
}

.earpiece {
    width: 45px;
    height: 6px;
    justify-content: center;
    background-color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 
        inset 0 3px 4px rgba(0,0,0,0.9),
        0 1px 1px rgba(255,255,255,0.3); /* Bottom highlight */
}

.helo {
    color: rgb(72, 72, 72);
    margin-top: 5px;
    
}

/* ---------------- BEZEL & SCREEN ---------------- */
.silver-bezel {
    width: 100%;
    background: linear-gradient(145deg, var(--silver-light), var(--silver-mid) 40%, var(--silver-dark));
    border-radius: 120px 120px 100px 100px / 70px 70px 100px 100px;
    padding: 10px;
    padding-bottom:20px;
    box-shadow: 
        inset 0 2px 5px rgba(255,255,255,0.9),
        inset -2px -2px 8px rgba(0,0,0,0.15),
        0 4px 10px rgba(0,0,0,0.2),
        0 -1px 2px rgba(255,255,255,0.5); /* Top lip highlight */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.screen-border {
    background-color: var(--screen-bezel);
    padding: 14px 14px 32px 14px;
    border-radius: 120px 120px 70px 70px / 50px 50px 60px 70px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 
        inset 0 3px 10px rgba(0,0,0,0.9),
        0 1px 2px rgba(255,255,255,0.6); /* Silver reflecting off black bezel */
    
}

.screen {
    position: relative; /* Needed for glare */
    width: 100%;
    height: 260px;
    background-color: var(--screen-green);
    border-radius: 8px 8px 70px 70px / 8px 8px 70px 70px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    color: var(--screen-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* The Glass Reflection */
.glass-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0) 40%, 
        rgba(255,255,255,0.15) 45%, 
        rgba(255,255,255,0) 50%
    );
    pointer-events: none; /* Let clicks pass through to buttons */
    z-index: 10;
}

/* Screen UI Elements */
.status-bar { display: flex; justify-content: space-between; padding: 6px 8px; font-size: 9px; border-bottom: 1px solid rgba(42, 51, 32, 0.3); z-index: 1;}
.music-ui { display: flex; flex-direction: column; align-items: center; padding: 10px; flex-grow: 1; z-index: 1;}
.header { font-size: 9px; background: var(--screen-dark); color: var(--screen-green); padding: 2px 8px; margin-bottom: 10px; }
.icon { 
width: 40px;  /* Adjust these to your liking */
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* CRITICAL: Prevents Flexbox from squishing it */
margin-top: 10px;
}
.icon1 { font-size: 20px; margin-bottom: 5px; transform: rotate(135deg);}
.icon2 { font-size: 20px; margin-bottom: 6px; transform: rotate(135deg); margin-right: 4px;}
.song-title { font-size: 20px; margin: 22px 0 30px 0; text-align: center; }
.icon svg {
    width: 100%;
    height: 80%;
    display: block;
}
.artist { font-size: 9px; margin: 0px 0 10px 0; font-weight: normal; }
.progress-container { width: 85%; height: 12px; border: 1px solid var(--screen-dark); margin-bottom: 10px; }
.preview-btn { background-color: var(--screen-dark); color: var(--screen-green); border: none; padding: 6px 15px; font-family: inherit; font-weight: bold; cursor: pointer; width: 85%; margin-bottom: 8px; font-size: 11px;}
.footer-action { font-size: 9px; }

/* ---------------- CONTROLS ---------------- */
.action-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 95%;
    margin-top: 10px;
    margin-bottom: 2px;
    gap: 22px;
}

.action-btn {
    border: none;
    background: linear-gradient(155deg, var(--silver-light), var(--silver-mid) 35%, var(--silver-dark));
    font-size: 8px;
    font-weight: bold;
    color: #8b8484;
    height: 35px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 
        -1px -1px 3px rgba(255,255,255,0.6), 
        2px 3px 5px rgba(86, 86, 86, 0.2);
}

.left-action { border-radius: 20px 8px 8px 60px; }
.right-action { border-radius: 8px 20px 60px 8px; }

.d-pad-container {
    position: relative;
    width: 55px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.d-pad-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 6px solid var(--silver-dark);
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 
        inset 1px 1px 4px rgba(0,0,0,0.4), 
        1px 2px 3px rgba(255,255,255,0.7);
}

.d-pad-center {
    width: 32px;
    height: 28px;
    background: linear-gradient(145deg, var(--silver-light), var(--silver-mid) 40%, var(--silver-dark));
    border: none;
    border-radius: 6px;
    z-index: 2;
    cursor: pointer;
    box-shadow: -1px -1px 2px rgba(255,255,255,0.6), 1px 2px 4px rgba(0,0,0,0.2);
}

/* ---------------- NUMPAD ---------------- */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 35px;
    width: 75%;
    margin-top: 10px;
}

.num-key {
    background: linear-gradient(145deg, var(--silver-light), var(--silver-mid) 40%, var(--silver-dark));
    border: none;
    border-radius: 100px; 
    height: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #8b8484;
    --key-rotation: 0deg; 
    --key-y: 0px; 
    transform: translateY(var(--key-y)) rotate(var(--key-rotation));    
    cursor: pointer;
    box-shadow: 
        -2px -2px 5px rgba(255,255,255,0.25), 
        2px 3px 6px rgba(0,0,0,0.2),
        inset 1px 1px 2px rgba(255,255,255,0.3);
    transition: all 0.1s ease;

    
}

.num-key span {
    font-size: 8px;
    font-weight: normal;
    color: #8b8484;
    margin-top: -2px;
}

/* Active states for haptic feedback */
.num-key:active, .action-btn:active, .d-pad-center:active {
    transform: scale(0.95) translateY(var(--key-y)) rotate(var(--key-rotation));
    background: rgb(212, 212, 212);
    box-shadow: 
        inset 2px 3px 6px rgba(0,0,0,0.3), 
        inset -1px -1px 3px rgba(255,255,255,0.2);

    /* Update your active state so it doesn't lose the rotation when clicked! */
    .num-key:active, .action-btn:active, .d-pad-center:active {
    /* Change the transform line to this: */
    transform: scale(0.90) rotate(var(--key-rotation));
    
    /* ... keep existing background and box-shadow ... */
    background: var(--lavender-base);
    box-shadow: 
        inset 2px 3px 6px rgba(0,0,0,0.3), 
        inset -1px -1px 3px rgba(255,255,255,0.2);
}
}


/* --- THE 3310 "SMILE" KEYPAD CURVE --- */

/* Row 1 (1, 2, 3) - Very subtle tilt */
.num-key:nth-child(1) { --key-rotation: 12deg; }
.num-key:nth-child(3) { --key-rotation: -12deg; }

/* Row 2 (4, 5, 6) - Noticeable tilt */
.num-key:nth-child(4) { --key-rotation: 12deg; }
.num-key:nth-child(6) { --key-rotation: -12deg; }

/* Row 3 (7, 8, 9) - Sharp tilt */
.num-key:nth-child(7) { --key-rotation: 12deg; }
.num-key:nth-child(9) { --key-rotation: -12deg; }

/* Row 4 (*, 0, #) - Maximum tilt hugging the bottom curve */
.num-key:nth-child(10) { --key-rotation: 12deg; }
.num-key:nth-child(12) { --key-rotation: -12deg; }

/* Row 1 (1, 2, 3) - Very subtle tilt */
/* Key 2 */
.num-key:nth-child(2) { --key-y: 2px; }

/* Key 5 */
.num-key:nth-child(5) { --key-y: 4px; }

/* Key 8 */
.num-key:nth-child(8) { --key-y: 6px; }

/* Key 0 (11th button) */
.num-key:nth-child(11) { --key-y: 8px; }

/* Row 4 (*, 0, #) - Maximum tilt hugging the bottom curve */



/* The middle column (2, 5, 8, 0) naturally stays at the default 0deg! */


.hidden {
    display: none !important;
}

/* Ensure the status bar stays visible on top of everything */
.status-bar {
    z-index: 20;
    position: relative;
}

.signal {
   margin-top: 0px;
}
.app-title {
    margin-top: 8px;
    font-size: 8px;
}

.battery {
    margin-top: 4px;
}

#notification-overlay {
    position: absolute;
    /* This starts it right under the status bar */
    top: 25px; 
    left: 0;
    width: 100%;
    /* This ensures it stops at the bottom of the green screen */
    height: calc(100% - 25px); 
    background: var(--screen-green);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    /* Critical: ensures the overlay follows the screen's bottom curve */
    border-radius: 0 0 70px 70px / 0 0 70px 70px;
    overflow: hidden;
}

.notification-box.incoming-layout {
    width: 100%;
    height: 100%;
    /* Remove any forced borders or outlines that make it look "boxy" */
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px 10px 8px 10px; /* Added padding to move soft keys up slightly */
    box-sizing: border-box;
}

.call-info {
    margin-top: 20px;
    text-align: center;
}

.soft-keys {
    display: flex;
    justify-content: center;
    width: 100%;
    /* This pushes the labels slightly away from the very edge of the curve */
    gap: 10px;
    box-sizing: border-box;
    margin-top: 2.5vh;
}
.sk-left { 

    font-weight: bold;
    cursor: pointer;
    font-size: 9px; background: var(--screen-dark); color: var(--screen-green); padding: 2px 8px; margin-bottom: 8px;
}

.sk-right { 
    font-size: 9px; background: var(--screen-dark); color: var(--screen-green); padding: 2px 8px; margin-bottom: 8px;
    font-weight: bold;
    font-size:9px;
    cursor: pointer;
}
/* State for missed call text */
.missed-call-text {
    color: #ff4d4d; /* Subtle red for the alert */
}

/* A simple missed call icon style if you don't use a new SVG */
.icon.missed svg {
    stroke: #2a3320;
    transform: rotate(135deg); /* Flips the phone to look "down" */
}

/* Blink animation for the incoming state */
.blinking {
    animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
    to { visibility: hidden; }
}

.vibrating {
    /* 3 second total cycle: 1s shake, 2s rest */
    animation: phone-pulse 2.8s infinite;
}

@keyframes phone-pulse {
    /* SECOND 1: Rapid Shaking (0% to 33%) */
    0%, 10%, 20%, 30% { transform: translate(0, 0); }
    5%, 15%, 25% { transform: translate(2px, 1px) rotate(1deg); }
    33% { transform: translate(0, 0) rotate(0deg); }

    /* SECONDS 2 & 3: Total Stillness (34% to 100%) */
    34%, 100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, -1px); }
    75% { transform: translate(1px, -1px); }
    100% { transform: translate(-1px, 1px); }
}
/* Ensure the header looks like a standard LCD block */
#ui-header {
    background-color: var(--screen-dark);
    color: var(--screen-green);
    padding: 2px 8px;
    font-size: 9px;
}
.blinking-colon {
    animation: blink-animation 1.5s steps(3, start) infinite;
}


#interaction-overlay {
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); /* Transparent Gray */
    backdrop-filter: blur(4px);     /* Optional: adds a nice frosted look */
    display: flex;
    justify-content: center;
    text-align:center;
    align-items: center;
    z-index: 10000;                /* High value to stay on top */
    cursor: pointer;
    color: rgb(224, 224, 224);
    font-size: 14px;
    letter-spacing: 2px;

}

/* Fade out effect */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}