/* =================================
   ROOT
================================= */

:root {

    --bg: #080d19;
    --panel: #101a2b;
    --panel2: #142238;

    --primary: #38bdf8;
    --primary-dark: #0ea5e9;

    --text: #edf5ff;
    --muted: #8493a8;

    --border: rgba(255,255,255,.07);

    --danger: #f87171;

}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    background: var(--bg);
    color: var(--text);

    font-family: Tahoma, Arial, sans-serif;

    min-height: 100vh;

    overflow-x: hidden;

}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    cursor: pointer;
    border: none;
    color: inherit;
}


.hidden {
    display: none !important;
}


/* =================================
   HEADER
================================= */

.header {

    height: 66px;

    position: sticky;
    top: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    background: rgba(8,13,25,.95);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(15px);

}


.brand {

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 15px;
    font-weight: bold;

    letter-spacing: 1px;

}


.brand-icon {
    color: var(--primary);
    font-size: 25px;
}


.icon-btn {

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    border-radius: 12px;

    font-size: 23px;

    color: var(--muted);

}


.icon-btn:hover {
    background: var(--panel2);
    color: var(--primary);
}


.menu-icon {
    font-size: 22px;
}


/* =================================
   DRAWER
================================= */

.drawer-overlay {

    position: fixed;
    inset: 0;

    z-index: 200;

    background: rgba(0,0,0,.65);

    opacity: 0;
    visibility: hidden;

    transition: .25s;

}


.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}


.drawer {

    position: fixed;

    top: 0;
    right: 0;

    z-index: 201;

    width: 290px;
    max-width: 85vw;

    height: 100vh;
    height: 100dvh;

    background: var(--panel);

    border-left: 1px solid var(--border);

    display: flex;
    flex-direction: column;

    overflow-y: auto;
    overscroll-behavior: contain;

    transform: translateX(110%);

    transition: transform .25s ease;

    -webkit-overflow-scrolling: touch;

}


.drawer.open {
    transform: translateX(0);
}


body.drawer-open {
    overflow: hidden;
}


.drawer-header {

    min-height: 78px;

    padding: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);

}


.drawer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}


.drawer-logo {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    background: var(--panel2);

    color: var(--primary);

    border-radius: 13px;

    font-size: 24px;

}


.drawer-title {
    font-size: 14px;
    font-weight: bold;
}


.drawer-subtitle {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}


.close-btn {
    font-size: 28px;
}


.drawer-user {

    margin: 16px;

    padding: 14px;

    display: flex;
    align-items: center;
    gap: 12px;

    background: var(--panel2);

    border-radius: 14px;

}


.avatar {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    background: rgba(56,189,248,.12);

    color: var(--primary);

    font-size: 22px;

}


.drawer-user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.drawer-user-info strong {
    font-size: 13px;
}


.drawer-user-info small {
    font-size: 10px;
    color: var(--muted);
}


.drawer-content {
    padding: 0 13px;
    flex: 1;
}


.drawer-section-title {

    color: var(--muted);

    font-size: 11px;

    padding: 16px 10px 8px;

}


.drawer-link {

    width: 100%;

    height: 48px;

    padding: 0 13px;

    display: flex;
    align-items: center;
    gap: 13px;

    text-align: right;

    background: transparent;

    color: var(--muted);

    border-radius: 11px;

    font-size: 13px;

    transition: .15s;

}


.drawer-link span:first-child {
    width: 23px;
    font-size: 20px;
    text-align: center;
}


.drawer-link.active {

    background: rgba(56,189,248,.10);

    color: var(--primary);

}


.drawer-link:hover {
    background: var(--panel2);
}


.drawer-divider {

    height: 1px;

    background: var(--border);

    margin: 14px 5px;

}


.drawer-footer {

    padding: 18px;

    display: flex;
    justify-content: space-between;

    font-size: 10px;

    color: var(--muted);

    border-top: 1px solid var(--border);

}


/* =================================
   MAIN
================================= */

.main-container {

    width: 100%;
    max-width: 1100px;

    margin: auto;

    padding: 35px 24px 80px;

}


.page {
    display: none;
}


.page.active {
    display: block;
}


/* =================================
   HOME
================================= */

.hero {

    min-height: 330px;

    padding: 45px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    background:

        radial-gradient(
            circle at 90% 10%,
            rgba(14,165,233,.16),
            transparent 35%
        ),

        linear-gradient(
            135deg,
            #101e32,
            #0b1424
        );

    border: 1px solid var(--border);

    border-radius: 22px;

}


.hero-badge {

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    background: rgba(56,189,248,.08);

    border: 1px solid rgba(56,189,248,.15);

    border-radius: 30px;

    font-size: 11px;

    color: var(--primary);

}


.online-dot {

    width: 7px;
    height: 7px;

    display: inline-block;

    background: #4ade80;

    border-radius: 50%;

}


.hero h1 {

    font-size: clamp(28px,5vw,45px);

    line-height: 1.7;

    margin-top: 22px;

}


.hero h1 span {
    color: var(--primary);
}


.hero p {

    max-width: 520px;

    color: var(--muted);

    line-height: 2;

    font-size: 14px;

    margin-top: 10px;

}


.primary-btn {

    min-height: 46px;

    padding: 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    background: var(--primary-dark);

    color: #03111d;

    font-weight: bold;

    border-radius: 11px;

    font-size: 13px;

    transition: .2s;

}


.primary-btn:hover {
    background: var(--primary);
}


.hero .primary-btn {
    margin-top: 25px;
}


.section-heading {

    margin: 38px 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

}


.section-heading h2 {
    font-size: 19px;
}


.section-heading p {

    color: var(--muted);

    font-size: 12px;

    margin-top: 8px;

}


.feature-grid {

    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 16px;

}


.feature-card {

    position: relative;

    padding: 25px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 17px;

    cursor: pointer;

    transition: .2s;

}


.feature-card:hover {

    border-color: rgba(56,189,248,.4);

    transform: translateY(-3px);

}


.feature-icon {

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    background: rgba(56,189,248,.1);

    color: var(--primary);

    border-radius: 13px;

    font-size: 25px;

}


.feature-card h3 {
    margin-top: 20px;
    font-size: 16px;
}


.feature-card p {

    margin-top: 10px;

    color: var(--muted);

    line-height: 2;

    font-size: 12px;

}


.feature-arrow {

    position: absolute;

    left: 22px;
    bottom: 22px;

    color: var(--primary);

}


.info-card {

    margin-top: 20px;

    padding: 20px;

    display: flex;
    align-items: flex-start;
    gap: 15px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 15px;

}


.info-icon {
    color: var(--primary);
    font-size: 25px;
}


.info-card h3 {
    font-size: 14px;
}


.info-card p {

    color: var(--muted);

    font-size: 12px;

    line-height: 2;

    margin-top: 8px;

}


/* =================================
   PAGE HEADING
================================= */

.page-heading {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;

}


.page-heading h1 {
    font-size: 25px;
}


.page-heading p {

    margin-top: 8px;

    color: var(--muted);

    font-size: 12px;

}


.heading-icon {
    font-size: 30px;
    color: var(--primary);
}


.back-btn {

    width: 42px;
    height: 42px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 12px;

    color: var(--primary);

    font-size: 22px;

    margin-left: 12px;

}


.detail-heading {
    justify-content: flex-start;
}


/* =================================
   FILTER
================================= */

.filter-list {

    display: flex;
    gap: 9px;

    overflow-x: auto;

    padding-bottom: 8px;

    scrollbar-width: none;

}


.filter-list::-webkit-scrollbar {
    display: none;
}


.filter-btn {

    flex-shrink: 0;

    padding: 10px 18px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 30px;

    color: var(--muted);

    font-size: 12px;

}


.filter-btn.active {

    background: rgba(56,189,248,.12);

    color: var(--primary);

    border-color: rgba(56,189,248,.3);

}


/* =================================
   CONFESSION CARDS
================================= */

.confession-list {

    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 15px;

    margin-top: 20px;

    padding-bottom: 75px;

}


.confession-card {

    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 15px;

    cursor: pointer;

    transition: .2s;

}


.confession-card:hover {
    border-color: rgba(56,189,248,.4);
}


.card-meta {

    display: flex;
    align-items: center;
    justify-content: space-between;

}


.card-user {

    display: flex;
    align-items: center;
    gap: 9px;

}


.small-avatar {

    width: 32px;
    height: 32px;

    font-size: 16px;

}


.card-user strong {
    font-size: 11px;
}


.card-user small {

    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;

}


.category-tag {

    padding: 6px 10px;

    color: var(--primary);

    background: rgba(56,189,248,.08);

    border-radius: 20px;

    font-size: 10px;

}


.confession-card h3 {

    font-size: 15px;

    margin-top: 18px;

}


.confession-preview {

    color: var(--muted);

    font-size: 12px;

    line-height: 2;

    margin-top: 10px;

    display: -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;

}


.card-footer {

    display: flex;
    align-items: center;
    gap: 15px;

    margin-top: 18px;
    padding-top: 13px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 11px;

}


.floating-write-btn {

    position: fixed;

    bottom: 25px;
    left: 25px;

    height: 52px;

    padding: 0 20px;

    display: flex;
    align-items: center;
    gap: 9px;

    background: var(--primary-dark);

    color: #03111d;

    font-weight: bold;

    border-radius: 14px;

    box-shadow: 0 5px 25px rgba(14,165,233,.2);

    z-index: 50;

}


.floating-write-btn span {
    font-size: 23px;
}


/* =================================
   EMPTY STATE
================================= */

.empty-state {

    text-align: center;

    padding: 60px 15px;

}


.empty-icon {

    color: var(--primary);

    font-size: 40px;

}


.empty-state h3 {
    margin-top: 15px;
}


.empty-state p {

    color: var(--muted);

    margin-top: 10px;

    font-size: 12px;

}


/* =================================
   DETAIL
================================= */

.detail-card {

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 17px;

    padding: 23px;

}


.detail-meta {

    display: flex;
    align-items: center;
    gap: 10px;

}


.detail-meta strong {
    font-size: 12px;
}


.detail-meta small {

    display: block;

    margin-top: 5px;

    font-size: 10px;

    color: var(--muted);

}


.anonymous-tag {

    margin-right: auto;

    padding: 7px 11px;

    background: rgba(56,189,248,.08);

    color: var(--primary);

    border-radius: 20px;

    font-size: 10px;

}


.detail-category {

    display: inline-block;

    margin-top: 25px;

    color: var(--primary);

    font-size: 11px;

}


.detail-card h2 {

    margin-top: 17px;

    font-size: 21px;

    line-height: 1.8;

}


.detail-text {

    margin-top: 18px;

    color: #c0ccdc;

    font-size: 14px;

    line-height: 2.4;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

}


.detail-actions {

    margin-top: 25px;

    padding-top: 18px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    gap: 20px;

    color: var(--muted);

    font-size: 12px;

}


.like-btn {

    background: transparent;

    color: #fb7185;

    font-size: 16px;

}


.like-btn.liked {
    color: #f43f5e;
}


/* =================================
   COMMENTS
================================= */

.comments-section {
    margin-top: 30px;
}


.comment-list {

    display: flex;
    flex-direction: column;
    gap: 12px;

}


.comment-card {

    padding: 16px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 13px;

}


.comment-card strong {
    font-size: 11px;
}


.comment-card p {

    margin-top: 9px;

    color: #c0ccdc;

    font-size: 12px;

    line-height: 2;

    overflow-wrap: anywhere;

}


.comment-form {

    margin-top: 20px;

    display: flex;
    flex-direction: column;
    gap: 12px;

}


textarea,
input,
select {

    width: 100%;

    color: var(--text);

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 11px;

    outline: none;

    padding: 14px;

}


textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 2;
}


textarea:focus,
input:focus,
select:focus {
    border-color: var(--primary);
}


/* =================================
   WRITE FORM
================================= */

.write-form {

    padding: 23px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 17px;

    display: flex;
    flex-direction: column;
    gap: 12px;

}


.write-form label {

    margin-top: 10px;

    font-size: 12px;

    color: #c7d4e5;

}


.write-form input,
.write-form select {
    min-height: 48px;
}


.write-form textarea {
    min-height: 190px;
}


.form-footer {

    display: flex;
    justify-content: space-between;

    color: var(--muted);

    font-size: 10px;

}


.privacy-notice {

    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin: 10px 0;

    padding: 15px;

    background: rgba(56,189,248,.06);

    border: 1px solid rgba(56,189,248,.1);

    border-radius: 12px;

    color: var(--primary);

}


.privacy-notice p {

    color: #aebed0;

    font-size: 11px;

    line-height: 2;

}


.full-btn {
    width: 100%;
}


/* =================================
   CHAT
================================= */

.chat-status {

    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    font-size: 11px;

    margin-bottom: 15px;

}


.chat-box {

    height: 500px;
    max-height: 65vh;

    display: flex;
    flex-direction: column;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 17px;

    overflow: hidden;

}


.chat-messages {

    flex: 1;

    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    overflow-y: auto;

}


.chat-placeholder {

    margin: auto;

    text-align: center;

    color: var(--muted);

}


.chat-placeholder div {

    font-size: 45px;

    color: var(--primary);

}


.chat-placeholder h3 {

    color: var(--text);

    font-size: 14px;

    margin-top: 15px;

}


.chat-placeholder p {

    font-size: 11px;

    margin-top: 8px;

}


.chat-message {

    max-width: 80%;

    padding: 12px 15px;

    border-radius: 13px;

    background: var(--panel2);

    font-size: 12px;

    line-height: 2;

    overflow-wrap: anywhere;

}


.chat-message.mine {

    align-self: flex-start;

    background: rgba(14,165,233,.17);

}


.chat-form {

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    border-top: 1px solid var(--border);

}


.chat-form input {
    flex: 1;
}


.chat-form button {

    width: 45px;
    height: 45px;

    background: var(--primary-dark);

    color: #03111d;

    border-radius: 12px;

    font-size: 20px;

}


/* =================================
   ACCOUNT
================================= */

.account-card {

    padding: 35px 20px;

    text-align: center;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 17px;

}


.account-avatar {

    width: 80px;
    height: 80px;

    margin: auto;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(56,189,248,.1);

    color: var(--primary);

    font-size: 35px;

}


.account-card h2 {
    margin-top: 17px;
    font-size: 18px;
}


.account-card > p {

    color: var(--muted);

    font-size: 11px;

    margin-top: 8px;

}


.account-id-box {

    max-width: 450px;

    margin: 25px auto 0;

    padding: 14px;

    background: var(--panel2);

    border-radius: 12px;

    display: flex;
    align-items: center;
    gap: 10px;

}


.account-id-box span {
    color: var(--muted);
    font-size: 10px;
}


.account-id-box strong {

    flex: 1;

    font-size: 10px;

    direction: ltr;

    overflow-wrap: anywhere;

}


.account-id-box button {

    padding: 8px 12px;

    background: var(--primary-dark);

    color: #03111d;

    border-radius: 8px;

    font-size: 10px;

}


.account-info-card {

    margin-top: 15px;

    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 15px;

}


.account-info-card > div {

    display: flex;
    justify-content: space-between;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);

}


.account-info-card > div:last-child {
    border-bottom: none;
}


.account-info-card strong {
    font-size: 12px;
}


.account-info-card span {
    color: var(--muted);
    font-size: 11px;
}


.account-info-card .status-text {
    color: #fbbf24;
}


/* =================================
   SETTINGS
================================= */

.settings-group {

    margin-bottom: 15px;

    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 15px;

}


.settings-title {

    color: var(--primary);

    font-size: 12px;

    margin-bottom: 10px;

}


.setting-row {

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 13px 0;

}


.setting-row strong {

    display: block;

    font-size: 12px;

}


.setting-row small {

    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 7px;

}


.setting-value {

    color: var(--muted);

    font-size: 11px;

}


/* SWITCH */

.switch {

    position: relative;

    width: 43px;
    height: 24px;

}


.switch input {
    display: none;
}


.switch span {

    position: absolute;
    inset: 0;

    background: #354357;

    border-radius: 20px;

    transition: .2s;

}


.switch span:before {

    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    top: 3px;
    right: 3px;

    background: white;

    border-radius: 50%;

    transition: .2s;

}


.switch input:checked + span {
    background: var(--primary-dark);
}


.switch input:checked + span:before {
    transform: translateX(-19px);
}


/* =================================
   TOAST
================================= */

.toast {

    position: fixed;

    bottom: 25px;
    right: 50%;

    transform: translate(50%,20px);

    padding: 13px 20px;

    background: #1b2b40;

    border: 1px solid var(--border);

    border-radius: 12px;

    color: var(--text);

    font-size: 12px;

    opacity: 0;

    visibility: hidden;

    transition: .2s;

    z-index: 500;

    max-width: 90vw;

    text-align: center;

}


.toast.show {

    opacity: 1;

    visibility: visible;

    transform: translate(50%,0);

}


/* =================================
   RESPONSIVE
================================= */

@media (max-width: 700px) {

    .main-container {
        padding: 22px 15px 70px;
    }


    .header {
        padding: 0 14px;
        height: 60px;
    }


    .hero {

        padding: 28px 22px;

        min-height: 300px;

    }


    .hero h1 {
        font-size: 29px;
    }


    .hero p {
        font-size: 12px;
    }


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


    .feature-card {
        padding: 20px;
    }


    .confession-list {
        grid-template-columns: 1fr;
    }


    .page-heading h1 {
        font-size: 21px;
    }


    .detail-card,
    .write-form {
        padding: 17px;
    }


    .floating-write-btn {

        bottom: 18px;
        left: 15px;

        height: 48px;

        font-size: 12px;

    }


    .chat-box {
        height: 60vh;
    }

}


@media (min-width: 1000px) {

    .main-container {
        padding-top: 45px;
    }


    .confession-list {
        grid-template-columns: repeat(3,1fr);
    }

}


/* =================================
   LIGHT THEME
================================= */

body.light-theme {

    --bg: #f1f5f9;
    --panel: #ffffff;
    --panel2: #e8eff7;

    --text: #152235;
    --muted: #66768a;

    --border: rgba(15,35,60,.1);

}


body.light-theme .header {
    background: rgba(241,245,249,.95);
}


body.light-theme .drawer {
    background: var(--panel);
}


body.light-theme .hero {

    background:

        radial-gradient(
            circle at 90% 10%,
            rgba(14,165,233,.12),
            transparent 35%
        ),

        linear-gradient(
            135deg,
            #ffffff,
            #eaf3fb
        );

}


body.light-theme .detail-text,
body.light-theme .comment-card p {
    color: #40536a;
}


body.light-theme .privacy-notice p {
    color: #52657a;
}


body.light-theme .chat-message {
    color: var(--text);
}
