/* ===== Nebula OS – Futuristic Dialer =================================== */
:root {
    --bg: #0b0f19;
    --bg2: #0a1328;
    --glass: rgba(255, 255, 255, .06);
    --stroke: rgba(255, 255, 255, .12);
    --ink: #e6ecff;
    --muted: #9ab0d6;
    --neon: #7cf8ff;
    /* cyan glow */
    --neon2: #9b6bff;
    /* purple glow */
    --ok: #34d399;
    --warn: #f97316;
    --danger: #ef4444;
}

/* BACKDROP */
html,
body {
    height: 100%
}

body {
    margin: 0;
    background: radial-gradient(60% 80% at 20% 10%, #12203a 0%, #0b0f19 45%, #060912 100%);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro", Segoe UI, Roboto, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PHONE SHELL */
.shell {
    width: 390px;
    height: 780px;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .1);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.title {
    height: 54px;
    display: flex;
    justify-content: center;
    /* centers horizontally */
    align-items: center;
    /* centers vertically */
    gap: 10px;
    padding: 0 16px;
    font-weight: 600;
    letter-spacing: .3px;
    border-bottom: 1px solid var(--stroke);
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    position: relative;
}

.title .orb {
    position: absolute;
    left: 16px;
    /* keeps the glowing orb at the left edge */
}

.orb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--neon), var(--neon2));
    box-shadow: 0 0 12px var(--neon);
}

/* PANELS */
.panel {
    position: absolute;
    inset: 54px 0 0 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    opacity: 0;
    visibility: hidden;
    transition: .25s
}

.panel.active {
    opacity: 1;
    visibility: visible
}

/* DISPLAY (number line) */
.display-wrap {
    padding: 16px 18px 8px
}

.display {
    width: 100%;
    background: var(--glass);
    color: var(--ink);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    font-size: 28px;
    text-align: center;
    padding: 14px 12px;
}

.display::placeholder {
    color: #7c8fb7
}

.hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    text-align: center
}

/* KEYPAD GRID – futuristic squares */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 18px 0;
}

.tile {
    height: 86px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: linear-gradient(175deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}

.tile .num {
    font-size: 28px;
    font-weight: 700
}

.tile small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
    letter-spacing: .08em
}

.tile:active {
    transform: translateY(1px);
    box-shadow: 0 0 0 3px rgba(124, 248, 255, .14) inset;
    border-color: rgba(124, 248, 255, .25)
}

/* CONTROLS (center call, clear at right) */
.controls {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 24px
}

.icon.ghost {
    position: absolute;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px dashed var(--stroke);
    color: var(--muted);
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.icon.ghost:active {
    background: rgba(255, 255, 255, .06);
    color: var(--ink)
}

.call {
    width: 86px;
    height: 86px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: radial-gradient(100% 100% at 30% 20%, #4ef3b1, #13a06b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(52, 211, 153, .45), inset 0 -6px 18px rgba(0, 0, 0, .25);
    animation: breathe 2.2s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.035)
    }
}

/* TABS */
.tabs {
    display: flex;
    border-top: 1px solid var(--stroke);
}

.tab {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
}

.tab.active {
    color: var(--neon)
}

/* TIMELINE / CALL LOG */
.log-head {
    padding: 3px 3px;
    border-bottom: 1px solid var(--stroke);
    font-weight: 700;
    letter-spacing: .2px
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 2px;
    margin-top: 4px;
    gap: 6px;
    /* reduced spacing between entries */
    overflow: auto;
}

.entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid var(--stroke);
    border-radius: 14px;
    /* slightly tighter corners */
    padding: 8px 12px;
    /* reduce internal padding */
    position: relative;
    margin-top: 6px;
}

.entry::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 6px;
    border-radius: 16px 0 0 16px;
    background: var(--neon2);
    opacity: .0;
}

.entry.outgoing::before {
    background: linear-gradient(var(--neon), var(--neon2));
    opacity: .8
}

.entry.incoming::before {
    background: linear-gradient(var(--ok), var(--neon));
    opacity: .8
}

.entry.missed::before {
    background: linear-gradient(#ff6b6b, #f43f5e);
    opacity: .9
}

.e-left {
    display: flex;
    align-items: center;
    gap: 12px
}

.badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
    border: 1px solid var(--stroke);
    color: var(--ink);
    font-weight: 700;
}

.meta {
    display: flex;
    flex-direction: column
}

.meta .name {
    font-weight: 700;
    letter-spacing: .2px
}

.meta .sub {
    font-size: 12px;
    color: var(--muted)
}

.dir {
    font-size: 16px;
    opacity: .9
}

.time {
    color: var(--muted);
    font-weight: 600
}

/* ACTIVE CALL – dark holographic */
.panel.dark {
    background: radial-gradient(70% 70% at 50% -10%, #18243f, #0b0f19 50%, #03060d 100%);
    grid-template-rows: 1fr auto auto
}

.call-top {
    display: grid;
    place-items: center;
    position: relative
}

.status {
    color: #c9d8ff;
    letter-spacing: .2px;
    opacity: .9;
    margin-top: 16px
}

.callee {
    font-weight: 800;
    font-size: 22px;
    margin-top: 6px
}

.timer {
    font-size: 32px;
    font-weight: 800;
    margin-top: 6px
}

.wave {
    position: absolute;
    inset: auto auto 78% auto;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124, 248, 255, .22), transparent 70%);
    filter: blur(12px);
    animation: pulse 3.8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(.9)
    }

    50% {
        transform: scale(1.1)
    }
}

.actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 10px 0 4px;
}

.sq {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 28px;
    cursor: pointer;
}

.sq span {
    font-size: 12px;
    color: #c9d8ff
}

.sq.active {
    box-shadow: 0 0 0 3px rgba(124, 248, 255, .18) inset;
    color: var(--neon)
}

.end-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0 28px
}

.end {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: radial-gradient(100% 100% at 30% 30%, #ff7b7b, #ef4444);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 28px rgba(239, 68, 68, .45), inset 0 -6px 18px rgba(0, 0, 0, .25);
}

/* SCROLLBAR subtle */
.timeline::-webkit-scrollbar {
    width: 8px
}

.timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 10px
}