:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --control-bg: rgba(255, 255, 255, 0.15);
    --control-hover: rgba(255, 255, 255, 0.25);
    --phone-border: #333333;
    --phone-width: 390px;
    --phone-height: 844px; /* iPhone 13/14 Pro dimensions */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #1a1a1a; /* Background outside phone */
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Phone Frame */
.phone-frame {
    width: var(--phone-width);
    height: var(--phone-height);
    background-color: var(--bg-color);
    border-radius: 40px;
    box-shadow: 0 0 0 12px var(--phone-border), 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* App Screen */
.app-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 70%);
}

/* Status Bar */
.status-bar {
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
}

.status-icons {
    display: flex;
    gap: 6px;
    font-size: 12px;
}

/* Nav Bar */
.nav-bar {
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
}

.nav-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 100px; /* Space for controls */
}

/* Orb Container */
.orb-container {
    position: relative;
    /* Removed fixed dimensions to allow original size */
    width: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    /* Ensure it has some height if images load slowly */
    min-height: 300px; 
}

.orb-state {
    position: absolute;
    /* Use original size but constrain to screen width */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 60vh; /* Don't take up full vertical space */
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.orb-state.active {
    opacity: 1;
}

/* Text Area */
.text-area {
    text-align: center;
    padding: 0 20px;
    z-index: 10;
}

.text-area h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.text-area p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Controls Container */
.controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.controls-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: rgba(30, 30, 30, 0.6);
    padding: 16px;
    border-radius: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.controls-panel button {
    background: var(--control-bg);
    border: none;
    color: white;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.controls-panel button:hover {
    background: var(--control-hover);
    transform: translateY(-1px);
}

.controls-panel button:active {
    transform: scale(0.96);
}

/* Fullscreen Mode Overrides */
body.is-fullscreen {
    padding: 0;
    background-color: #000000;
}

body.is-fullscreen .phone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

body.is-fullscreen .status-bar {
    display: none; /* Hide simulated status bar in fullscreen */
}

body.is-fullscreen .app-screen {
    border-radius: 0;
}
