/* --- GLOBAL --- */
* { box-sizing: border-box; user-select: none; }

body {
    margin: 0; min-height: 100vh;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 15px;
    background-color: #ffeef5;
    background-image: url(https://i.pinimg.com/736x/f4/f7/46/f4f7465b20ffed4436b82601707cd3ca.jpg);
    background-size: cover;
    font-family: 'Inter', sans-serif;
}

/* --- BACK BUTTON --- */
.back-btn {
    position: fixed; top: 20px; left: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #ffc1e3; padding: 6px 14px; border-radius: 20px;
    text-decoration: none; font-weight: 700; font-size: 10px;
    border: 2px solid #ffc1e3;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
    transition: all 0.2s ease; z-index: 100; backdrop-filter: blur(5px);
}
.back-btn:hover { transform: translateY(-2px); background-color: rgba(249, 185, 217, 0.73); color: white; }

/* --- CONTAINER --- */
.scene-container {
    position: relative; display: flex; justify-content: center;
}

/* --- RESIZED BLACKBERRY CONTAINER (Mini) --- */
.blackberry-container {
    position: relative;
    width: 240px; /* Reduced from 280px */
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(189, 143, 163, 0.6));
}

.phone-bg { width: 100%; display: block; height: auto; }

/* --- SCREEN OVERLAY --- */
.screen-overlay {
    position: absolute;
    top: 18%; left: 11%; width: 77.9%; height: 34.8%;
    background: #fff;
    background-image: 
        radial-gradient(#ffdde6 15%, transparent 16%),
        radial-gradient(#ffdde6 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 2px; overflow: hidden;
    display: flex; flex-direction: column;
}

/* --- 1. BB STATUS BAR --- */
.bb-status-bar {
    height: 10px;
    background: rgba(0,0,0,0.1); 
    color: #444;
    font-size: 6px; font-weight: bold; 
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 4px;
    font-family: 'Inter', sans-serif;
}
.center-stat { font-weight: 600; }

/* --- 2. APP HEADER --- */
.bb-app-header {
    height: 16px;
    background: linear-gradient(to bottom, #ffc1e3 0%, #ff9eb5 50%, #ff8da8 51%, #ff69b4 100%);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4px;
    border-bottom: 1px solid #d10069;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.app-icon { font-size: 8px; }
.app-title { font-weight: bold; font-size: 8px; flex-grow: 1; margin-left: 4px;}
.app-signal { font-size: 6px; opacity: 0.8; }

/* --- 3. MAIN CONTENT AREA --- */
.bb-content {
    flex-grow: 1;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Date Strip */
.date-strip {
    background: rgba(255,255,255,0.6);
    padding: 1px 4px;
    font-size: 6px; font-weight: bold; color: #666;
    text-transform: uppercase; border-bottom: 1px solid #ffdae8;
}

/* CONTACT CARD (Ultra Compact) */
.contact-card {
    display: flex; align-items: center; gap: 5px;
    padding: 3px; margin: 3px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #ffdae8;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(255, 105, 180, 0.4);
    background: linear-gradient(to bottom, #fff 0%, #fff0f5 100%);
}
.contact-card.selected { border: 1px solid #ff69b4; }

.avatar-frame {
    position: relative; width: 28px; height: 28px; 
    border: 1px solid #ccc; padding: 1px; background: white; border-radius: 2px;
}
#char-img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.status-dot {
    position: absolute; top: -1px; right: -1px;
    width: 5px; height: 5px; background: #39ff14; 
    border: 1px solid white; border-radius: 50%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.contact-info { flex-grow: 1; overflow: hidden; }
#char-name {
    margin: 0; font-size: 10px; color: #000; font-weight: 700;
}
.status-msg {
    margin: 1px 0 0 0; font-size: 7px; color: #666;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pin-info {
    font-size: 6px; color: #ff69b4; margin-top: 1px; letter-spacing: 0.5px;
}

/* UI Elements */
.list-divider {
    background: rgba(255, 182, 193, 0.3);
    color: #d10069; font-size: 6px; font-weight: bold;
    padding: 1px 4px; margin-top: 2px;
}
.dummy-item {
    padding: 3px 4px; display: flex; gap: 4px; align-items: center;
    font-size: 7px; color: #555; opacity: 0.6;
}

/* --- 4. ACTION BAR --- */
.bb-action-bar {
    height: 12px;
    background: linear-gradient(to bottom, #eee, #ccc);
    border-top: 1px solid #bbb;
    display: flex; justify-content: space-between; padding: 0 5px;
    align-items: center;
}
.action-btn { font-size: 7px; color: #555; }


/* --- CONTROLS --- */
.controls-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.hitbox {
    position: absolute; cursor: pointer; pointer-events: auto;
}

/* Trackball Positions */
.trackball-center { top: 58%; left: 47%; width: 7%; height: 7%; border-radius: 50%; background: rgba(0, 0, 0, 0);}
.trackball-left { top: 58%; left: 40%; width: 5%; height: 5%; background:rgba(0, 0, 0, 0)}
.trackball-right { top: 58%; left: 55%; width: 5%; height: 5%; background: rgba(0, 0, 0, 0)}