/* Communify • Tema Violeta | UI responsiva sem alterar a lógica do projeto */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    color-scheme: dark;
    --bg: #09070e;
    --bg-soft: #100c1a;
    --surface: #14101f;
    --card: #1b1429;
    --card-hover: #26193b;
    --text: #f7f4ff;
    --muted: #b0a6c1;
    --faint: #857992;
    --accent: #9659ff;
    --accent-hover: #ac7bff;
    --accent-2: #d1b6ff;
    --line: rgba(194, 162, 255, .16);
    --line-strong: rgba(194, 162, 255, .31);
    --shadow: 0 22px 76px rgba(0, 0, 0, .31);
    --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse 58% 34% at 89% 3%, rgba(101, 43, 186, .18), transparent 72%),
        radial-gradient(ellipse 35% 27% at 4% 48%, rgba(78, 28, 126, .12), transparent 76%),
        var(--bg);
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
::selection { background: #854bf0; color: #fff; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, .brand-name { font-family: 'Space Grotesk', 'DM Sans', sans-serif; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.13; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); line-height: 1.2; }
h3 { font-size: 1.13rem; line-height: 1.35; }
p { margin-bottom: 1.2em; }
a { color: var(--accent-2); text-underline-offset: 3px; transition: color .2s ease; }
a:hover { color: #f0e4ff; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #caabff; outline-offset: 3px; }

#topbar {
    position: relative;
    z-index: 5;
    background: rgba(11, 8, 18, .89);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
}
.topbar-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
    min-height: 80px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.brand { display: inline-flex; gap: 11px; align-items: center; white-space: nowrap; text-decoration: none; color: var(--text); }
#topbar .brand { color: var(--text); }
.brand-icon {
    display: grid; place-items: center;
    flex: 0 0 39px; width: 39px; height: 39px;
    background: linear-gradient(145deg, #b27aff, #6b2ed2);
    border: 1px solid rgba(255,255,255,.23);
    border-radius: 12px;
    box-shadow: 0 5px 22px rgba(139, 66, 247, .27);
}
.brand-icon svg { width: 23px; height: 23px; stroke: #fff; }
.brand-name { font-size: 1.36rem; font-weight: 700; letter-spacing: -.055em; }
.brand-name span { color: var(--accent-2); }
.topbar-links, .topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-links { margin-left: 18px; }
.topbar-actions { margin-left: auto; }
#topbar a.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: .92rem;
    transition: background .2s, color .2s;
}
#topbar a.nav-link:hover { background: rgba(148, 90, 255, .12); color: var(--text); }
.user-chip {
    background: rgba(155, 96, 255, .10);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .82rem;
    max-width: 155px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.spacer { flex: 1; }
#container { width: min(1200px, 100%); margin: 0 auto; padding: 48px 30px 70px; min-height: calc(100vh - 180px); }
.site-footer { border-top: 1px solid var(--line); background: rgba(15, 11, 23, .65); }
.site-footer__inner { width: min(1200px, 100%); padding: 20px 30px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.site-footer__name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -.04em; }
.site-footer .muted { font-size: .84rem; }

.muted { color: var(--muted); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 800;
    font-size: .72rem;
}
.eyebrow::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 0 5px rgba(150, 89, 255, .14); }
.highlight { color: #bd94ff; }
.section-intro { margin-bottom: 30px; }
.section-intro h1, .section-intro h2 { margin-bottom: 10px; }
.section-intro .muted { max-width: 710px; }

.panel {
    background: linear-gradient(140deg, rgba(30, 21, 45, .93), rgba(17, 13, 28, .97));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.panel > h1, .panel > h2 { margin-bottom: 10px; }
.narrow { width: 100%; max-width: 630px; margin-left: auto; margin-right: auto; }
.card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(38, 27, 57, .95), rgba(22, 16, 34, .98));
    padding: 22px;
    transition: transform .2s, border-color .2s, background .2s;
}
.card:hover { border-color: var(--line-strong); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 17px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.btn, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 45px;
    padding: 11px 20px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-weight: 800;
    font-size: .91rem;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn { color: #fff; background: linear-gradient(125deg, #9e65ff, #7736e9); box-shadow: 0 8px 24px rgba(120, 51, 230, .21); }
.btn:hover { color: #fff; transform: translateY(-2px); background: linear-gradient(125deg, #b28aff, #874bf4); box-shadow: 0 10px 28px rgba(132, 64, 245, .30); }
.btn-secondary { background: rgba(144, 80, 248, .065); border-color: var(--line-strong); color: #e9d9ff; }
.btn-secondary:hover { color: #fff; background: rgba(144, 80, 248, .18); border-color: rgba(194, 162, 255, .54); transform: translateY(-1px); }
.btn:disabled, .btn-secondary:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }
#topbar a.btn, #topbar a.btn-secondary { text-decoration: none; }

/* HOME / HERO */
.home-hero {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 46px;
    min-height: 550px;
    padding: 42px 0 68px;
}
.hero-copy h1 { max-width: 690px; margin-bottom: 23px; font-size: clamp(2.65rem, 5vw, 4.65rem); line-height: 1.095; letter-spacing: -.065em; }
.hero-copy > .muted { max-width: 510px; margin-bottom: 30px; font-size: 1.08rem; line-height: 1.8; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.hero-pills span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(183, 130, 255, .065); border: 1px solid var(--line); color: #c0b3d3; font-weight: 600; font-size: .8rem; }
.hero-pills span::before { content: '✦'; color: #bd91ff; font-size: .8rem; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 480px; isolation: isolate; }
.hero-art::before { content: ''; position: absolute; inset: 7% 2%; z-index: -2; background: radial-gradient(circle, rgba(131, 65, 238, .24), transparent 66%); filter: blur(9px); }
.hero-art::after { content: ''; position: absolute; width: 65%; aspect-ratio: 1; border: 1px solid rgba(181,124,255,.13); border-radius: 50%; z-index: -1; box-shadow: 0 0 0 37px rgba(119,62,206,.033), 0 0 0 79px rgba(119,62,206,.022); }
.preview-player {
    position: relative;
    width: min(100%, 410px);
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #26183d, #120d1f 65%);
    border: 1px solid rgba(196,151,255,.28);
    border-radius: 27px;
    box-shadow: 0 35px 100px rgba(0,0,0,.55), 0 10px 55px rgba(123, 62, 222,.18), inset 0 1px rgba(255,255,255,.08);
    transform: rotate(-2deg);
}
.preview-player::before { content: ''; position: absolute; width: 210px; height: 210px; top: -130px; right: -110px; border-radius: 50%; background: rgba(155, 89, 255, .24); filter: blur(52px); pointer-events: none; }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; font-weight: 800; font-size: .77rem; letter-spacing: .12em; text-transform: uppercase; }
.preview-top .preview-chip { color: #cab0ec; border: 1px solid var(--line); border-radius: 100px; padding: 5px 9px; font-size: .65rem; }
.vinyl-stage { position: relative; display: grid; place-items: center; height: 252px; margin-top: 10px; }
.vinyl { width: 217px; height: 217px; display: grid; place-items: center; border-radius: 50%; background: repeating-radial-gradient(circle at center, #100d17 0px, #100d17 7px, #261a35 8px, #100d17 10px, #110e1b 12px); border: 1px solid #37264c; box-shadow: 0 15px 35px rgba(0,0,0,.49), inset 0 0 8px rgba(0,0,0,.9); animation: vinyl-spin 14s linear infinite; }
.vinyl-label { display: grid; place-items: center; width: 95px; height: 95px; border: 7px solid #190e29; border-radius: 50%; background: radial-gradient(circle at 25% 18%, #bf97ff, #6b2dd2 72%); box-shadow: 0 0 24px rgba(169, 104, 255, .13); }
.vinyl-label svg { width: 46px; height: 46px; stroke: #fff; }
.vinyl-label::after { content: ''; width: 8px; height: 8px; position: absolute; border-radius: 50%; background: #faf6ff; }
.preview-song { text-align: center; position: relative; z-index: 1; }
.preview-song h3 { margin-bottom: 3px; font-size: 1.25rem; }
.preview-song p { color: #aca0c2; font-size: .9rem; margin-bottom: 18px; }
.fake-progress { height: 5px; background: rgba(255,255,255,.10); border-radius: 999px; margin-bottom: 17px; overflow: hidden; }
.fake-progress::before { content: ''; width: 42%; display: block; height: 100%; background: linear-gradient(90deg, #7940e5, #bf9aff); border-radius: inherit; }
.preview-bottom { display: flex; align-items: center; justify-content: center; gap: 25px; color: #a699bd; font-size: 1.05rem; }
.preview-play { display: grid; place-items: center; width: 47px; height: 47px; background: #a46cff; border-radius: 50%; color: #fff; box-shadow: 0 6px 25px rgba(145, 74, 249,.3); }
.preview-play svg { width: 21px; height: 21px; margin-left: 2px; fill: currentColor; }
@keyframes vinyl-spin { to { transform: rotate(360deg); } }

.feature-section { padding-top: 18px; }
.feature-section .section-intro { margin-bottom: 23px; }
.feature-card { min-height: 224px; padding: 25px; }
.feature-card__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; color: #d1b5ff; font-size: 1.5rem; border: 1px solid rgba(173,118,252,.29); border-radius: 14px; background: linear-gradient(150deg, rgba(141,71,244,.23),rgba(141,71,244,.08)); }
.feature-card h3 { margin-bottom: 9px; }
.feature-card .muted { font-size: .92rem; margin: 0; }

/* STATIONS */
.station-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.station-card:hover { transform: translateY(-4px); }
.station-art { display: grid; place-items: center; height: 142px; background: radial-gradient(circle at 60% 45%, rgba(190,138,255,.23), transparent 45%), linear-gradient(135deg, #45246c, #1d1230 82%); border-bottom: 1px solid rgba(196,151,255,.12); }
.station-art::before { content: ''; position: absolute; }
.station-art svg { width: 54px; height: 54px; stroke: #e9d8ff; filter: drop-shadow(0 3px 18px rgba(178,103,255,.35)); }
.station-card:nth-child(3n+2) .station-art { background: radial-gradient(circle at 34% 65%, rgba(178,96,255,.32), transparent 45%), linear-gradient(135deg, #392352, #160f25 82%); }
.station-card:nth-child(3n) .station-art { background: radial-gradient(circle at 78% 26%, rgba(196,144,255,.25), transparent 43%), linear-gradient(135deg, #281c46, #181027 82%); }
.station-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 22px; }
.station-card__body h3 { font-size: 1.15rem; margin-bottom: 5px; }
.station-card__body p { font-size: .9rem; margin-bottom: 20px; }
.station-card__body a { margin-top: auto; font-size: .88rem; font-weight: 800; text-decoration: none; color: #c9a9ff; }
.station-card__body a:hover { color: #fff; }
.station-list { display: flex; flex-direction: column; padding: 0; margin: 0; gap: 10px; list-style: none; }
.station-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); background: rgba(144,90,220,.065); border-radius: 13px; }
.station-list li a { font-weight: 700; text-decoration: none; }
.empty-state { padding: 33px; border: 1px dashed var(--line-strong); border-radius: 15px; color: var(--muted); text-align: center; background: rgba(141, 81, 246, .045); }
.list { margin: 0; padding-left: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: rgba(142, 72, 248, .17); color: #d6bbff; border: 1px solid rgba(178,128,255,.23); font-size: .73rem; font-weight: 800; letter-spacing: .025em; }
.muted-badge { color: #c4b6d6; background: rgba(255,255,255,.052); border-color: rgba(255,255,255,.12); }

/* FORMS */
.auth-panel, .create-panel { padding: 40px; margin-top: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-stack label { display: flex; flex-direction: column; gap: 7px; color: #ede5fa; font-size: .88rem; font-weight: 700; }
input:not([type="checkbox"]), textarea, select {
    display: block; width: 100%; min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: #100c1a;
    color: #fff;
    outline: none;
    transition: border .2s, box-shadow .2s, background .2s;
}
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #877a9d; }
input:not([type="checkbox"]):focus, textarea:focus, select:focus { border-color: #a66bff; box-shadow: 0 0 0 3px rgba(155,89,255,.14); background: #151020; }
input[type="file"] { padding: 9px; font-size: .83rem; }
input[type="file"]::file-selector-button { margin-right: 12px; background: rgba(158,96,251,.17); color: #e7d2ff; border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.inline-check { flex-direction: row !important; align-items: center; gap: 12px !important; cursor: pointer; }
input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; accent-color: #9555f7; cursor: pointer; }
.form-stack > .btn { align-self: flex-start; margin-top: 5px; }
.auth-panel .form-stack > .btn { align-self: stretch; }
.form-message:not(:empty) { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(144,73,255,.08); }
.auth-switch { border-top: 1px solid var(--line); padding-top: 21px; margin: 24px 0 0; font-size: .89rem; }

/* STATION PLAYER */
.detail-embed { max-width: 960px; margin-left: auto; margin-right: auto; }
.station-heading h1 { margin: 4px 0 10px; }
.station-heading .badge { margin: 0 0 8px; }
.live-card { margin-top: 24px; padding: 24px; background: linear-gradient(155deg, #221631, #120e1f); }
.live-card h2 { margin-bottom: 15px; }
.radio-console { margin: 14px 0 18px; }
.radio-console__face {
    overflow: hidden;
    border-radius: 20px;
    background: radial-gradient(ellipse 75% 90% at 50% -30%, rgba(149,81,244,.24), transparent 78%), #0d0a15;
    border: 1px solid rgba(197,149,255,.23);
    padding: 23px 25px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 33px rgba(0,0,0,.18);
}
.radio-console__header, .radio-console__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #b19aca; }
.radio-console__header .radio-console__badge { color: #e3ccff; }
.radio-console__display { padding: 30px 18px 18px; text-align: center; color: #fff; }
.radio-console__label { font-size: .69rem; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; color: #b898e6; margin: 0 0 12px; }
.radio-console__display h3 { margin: 0 auto 6px; max-width: 630px; overflow-wrap: anywhere; font-size: clamp(1.4rem,3vw,2.1rem); line-height: 1.2; }
.radio-console__display p:last-child { margin: 0; color: #b3a6c8; font-size: 1rem; }
.radio-wave { height: 59px; display: flex; justify-content: center; align-items: center; gap: 5px; margin: 4px 0 0; }
.radio-wave i { display: block; height: 18px; width: 5px; border-radius: 99px; background: linear-gradient(180deg, #c99eff, #7e40e7); animation: wave 1.2s ease-in-out infinite alternate; }
.radio-wave i:nth-child(2), .radio-wave i:nth-child(8) { animation-delay: -.3s; height: 29px; }
.radio-wave i:nth-child(3), .radio-wave i:nth-child(7) { animation-delay: -.6s; height: 40px; }
.radio-wave i:nth-child(4), .radio-wave i:nth-child(6) { animation-delay: -.15s; height: 24px; }
.radio-wave i:nth-child(5) { animation-delay: -.45s; height: 46px; }
.radio-wave i:nth-child(9) { animation-delay: -.8s; height: 15px; }
@keyframes wave { 0% { transform: scaleY(.42); opacity: .7; } 100% { transform: scaleY(1.1); opacity: 1; } }
.radio-console__footer { border-top: 1px solid var(--line); padding-top: 17px; font-size: .69rem; }
.playback-state-pill, .radio-console__timestamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(144,85,240,.17); border: 1px solid rgba(194,160,255,.25); font-size: .74rem; color: #dac5ff; }
.playback-state-pill::before { content: ''; width: 7px; height: 7px; background: #ac73ff; border-radius: 50%; }
.live-controls { align-items: center; margin: 18px 0; }
.live-controls .btn { min-width: 169px; }
.live-controls audio { display: block; }
audio { width: 100%; accent-color: #9659ff; }
.queue-editor { display: grid; gap: 11px; }
.queue-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0; padding: 17px 20px; border-radius: 15px; background: rgba(157,108,236,.065); }
.queue-item h3 { margin: 0 0 4px; font-size: 1rem; }
.queue-item p { margin: 0; font-size: .85rem; }
.queue-item .btn-secondary { min-height: 37px; padding: 8px 12px; font-size: .78rem; }
.loading-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(7,5,12,.75); backdrop-filter: blur(7px); }
.loading-overlay[hidden] { display: none; }
.loading-card { min-width: 220px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.loading-spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 930px) {
    .topbar-inner { gap: 12px; }
    .topbar-links { margin-left: 5px; }
    .home-hero { gap: 20px; min-height: 0; }
    .hero-copy h1 { font-size: clamp(2.55rem, 5.1vw, 3.4rem); }
    .hero-art { min-height: 415px; }
    .preview-player { max-width: 355px; }
    .vinyl-stage { height: 210px; }
    .vinyl { width: 185px; height: 185px; }
}
@media (max-width: 700px) {
    .topbar-inner { padding: 12px 18px; flex-wrap: wrap; gap: 6px; }
    .brand { margin-right: auto; }
    .brand-name { font-size: 1.22rem; }
    .topbar-actions { margin-left: auto; gap: 6px; }
    .topbar-links { flex-basis: 100%; order: 3; margin: 2px -9px 0; }
    #topbar a.nav-link { padding: 7px 10px; font-size: .85rem; }
    .topbar-actions .user-chip { max-width: 115px; }
    .topbar-actions .btn, .topbar-actions .btn-secondary { padding: 8px 12px; min-height: 37px; font-size: .83rem; }
    #container { padding: 30px 17px 50px; }
    .panel { padding: 22px; border-radius: 18px; }
    .home-hero { grid-template-columns: 1fr; gap: 4px; padding: 26px 0 48px; }
    .hero-copy h1 { font-size: clamp(2.6rem, 10vw, 4.1rem); }
    .hero-copy > .muted { font-size: 1rem; }
    .hero-art { min-height: 415px; }
    .preview-player { transform: rotate(-1deg); max-width: 340px; }
    .hero-pills { margin-top: 26px; }
    .row-between { align-items: flex-start; flex-wrap: wrap; }
    .site-footer__inner { padding: 18px; }
    .auth-panel, .create-panel { padding: 25px; }
    .queue-item { flex-wrap: wrap; }
    .queue-item .row-gap { width: 100%; }
}
@media (max-width: 430px) {
    .brand-icon { width: 35px; height: 35px; flex-basis: 35px; }
    .brand-name { font-size: 1.14rem; }
    #container { padding-left: 14px; padding-right: 14px; }
    .panel { padding: 19px; }
    .hero-art { min-height: 395px; }
    .preview-player { padding: 19px; }
    .vinyl-stage { height: 205px; }
    .site-footer__inner { flex-direction: column; text-align: center; gap: 2px; }
    .radio-console__face { padding: 15px; }
    .radio-console__display { padding: 20px 6px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
