@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --bg: #0b1224;
    --bg-soft: #0f1b35;
    --panel: #121b2f;
    --panel-light: #17223d;
    --text: #f8fafc;
    --muted: #9aa6c1;
    --accent: #36d399;
    --accent-2: #38bdf8;
    --accent-3: #f9b765;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 20px 50px rgba(8, 10, 20, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 45%),
        radial-gradient(circle at 20% 20%, rgba(249, 183, 101, 0.14), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(54, 211, 153, 0.18), transparent 45%),
        linear-gradient(180deg, #0b1020, #0f172a 55%, #0b1020);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    opacity: 0.4;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    inset: -20%;
    background: conic-gradient(from 120deg, rgba(56, 189, 248, 0.08), rgba(54, 211, 153, 0.06), rgba(249, 183, 101, 0.08), rgba(56, 189, 248, 0.08));
    filter: blur(120px);
    opacity: 0.7;
    z-index: -2;
    animation: glow-drift 18s ease-in-out infinite;
}

.hero {
    padding: 36px 24px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.1), rgba(167, 243, 208, 0.08));
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: center;
    animation: rise 0.6s ease-out;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 600;
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 10px;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
    margin: 0 0 12px;
}

.sub {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}


.stat-card {
    background: rgba(18, 27, 47, 0.85);
    border-radius: 18px;
    padding: 18px 22px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

.stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    color: var(--accent-2);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    align-items: start;
}

.panel {
    background: rgba(18, 27, 47, 0.78);
    border-radius: 20px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    animation: rise 0.7s ease-out;
}

.panel,
.dialog {
    border-radius: 22px;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(56, 189, 248, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.panel:hover::after {
    opacity: 1;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.panel-header h2 {
    margin: 0;
    font-size: 20px;
}

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

.controls {
    margin-bottom: 24px;
}

.search,
.add-number,
.number-search {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: center;
}

.search input,
.add-number input,
.number-search input {
    padding: 12px 14px;
    border-radius: 16px;
    border: 2px solid rgba(148, 163, 184, 0.28);
    font-size: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
}

.search input::placeholder,
.add-number input::placeholder,
.number-search input::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

.search button,
.search .ghost,
.add-number button,
.number-search button {
    padding: 12px 16px;
    border-radius: 999px;
    border: none;
    background: var(--accent-2);
    color: #08121f;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search .ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.btn-ghost {
    padding: 12px 18px;
    border-radius: 999px;
    border: 2px solid rgba(56, 189, 248, 0.45);
    background: linear-gradient(120deg, rgba(110, 231, 255, 0.2), rgba(167, 243, 208, 0.2));
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(7, 12, 24, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 16px 30px rgba(7, 12, 24, 0.6);
}

.add-number button {
    background: var(--accent);
    color: #052016;
}

.number-search button {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.search button:hover,
.add-number button:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 14px 24px rgba(7, 12, 24, 0.55);
    filter: brightness(1.05);
}

.notice {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--text);
    font-size: 13px;
}

.inbox {
    display: grid;
    gap: 16px;
}

.sender-list {
    display: grid;
    gap: 12px;
}

.sender-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: rgba(15, 23, 42, 0.92);
    border-radius: 16px;
    padding: 12px 14px;
    border: 2px solid rgba(148, 163, 184, 0.22);
    align-items: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.sender-row:hover {
    border-color: rgba(56, 189, 248, 0.6);
    transform: translateY(-1px);
}

.sender-row.active {
    border-color: rgba(54, 211, 153, 0.8);
    box-shadow: 0 12px 22px rgba(11, 20, 36, 0.45);
}

.sender-name {
    font-weight: 600;
    font-size: 15px;
}

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

.sender-link {
    color: inherit;
    text-decoration: none;
    flex: 1;
    display: block;
}

.sender-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-form {
    margin: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-button:hover {
    border-color: rgba(249, 183, 101, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(7, 12, 24, 0.4);
}

.icon-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.sender-pill {
    align-self: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(110, 231, 255, 0.18);
    border: 2px solid rgba(110, 231, 255, 0.45);
    color: var(--accent-2);
}

.message {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 16px 30px rgba(5, 8, 20, 0.45);
    position: relative;
    overflow: hidden;
    animation: rise 0.7s ease-out;
}

.message::before {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 4px solid var(--accent);
    opacity: 0.8;
    pointer-events: none;
}

.message:nth-child(2n)::before {
    border-left-color: var(--accent-2);
}

.message::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(56, 189, 248, 0.08), transparent);
    transform: translateX(-120%);
    animation: shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

.meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sender {
    font-size: 16px;
}

.timestamp {
    color: var(--muted);
    font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
}

.body {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

.device {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
}

.empty {
    background: rgba(15, 23, 42, 0.85);
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.3);
}

.empty.slim {
    padding: 20px;
    background: transparent;
    border: none;
}

.control-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.selected-badge {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(12, 18, 32, 0.9);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 0 0 1px rgba(54, 211, 153, 0.15);
}

.selected-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(148, 163, 184, 0.9);
}

.dialog {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 18px;
    padding: 18px;
    background: rgba(12, 18, 32, 0.98);
    color: var(--text);
    max-width: 520px;
    width: min(92vw, 520px);
    box-shadow: var(--shadow);
}

.dialog::backdrop {
    background: rgba(8, 10, 20, 0.6);
    backdrop-filter: blur(2px);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    40% {
        opacity: 0.5;
    }
    60% {
        opacity: 0.2;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes glow-drift {
    0% {
        transform: translate(-6%, -2%) rotate(0deg);
    }
    50% {
        transform: translate(6%, 4%) rotate(8deg);
    }
    100% {
        transform: translate(-6%, -2%) rotate(0deg);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 36px 18px 24px;
    }

    .hero-inner {
        text-align: center;
        justify-items: center;
    }


    h1 {
        font-size: clamp(20px, 6vw, 26px);
    }

    .sub {
        font-size: 12px;
    }

    .container {
        padding: 18px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 14px;
    }

    .search {
        grid-template-columns: 1fr;
    }

    .search button,
    .search .ghost {
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 12px;
        width: 100%;
    }

    .btn-ghost {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
    }

    .selected-badge {
        font-size: 11px;
        padding: 6px 10px;
    }

    .hero-art svg {
        width: min(200px, 60vw);
    }

    .sender-row {
        padding: 10px 12px;
    }

    .sender-pill {
        font-size: 10px;
        padding: 4px 8px;
    }

    .icon-button {
        width: 30px;
        height: 30px;
    }
}
