:root {
    --navy: #0b192c;
    --navy-light: #1e3e62;
    --gold: #d4af37;
    --gold-light: #f4e8c1;
    --bg-cream: #faf7f2;
    --card-bg: #ffffff;
    --red-accent: #e74c3c;
    --font-heading: 'Linux Libertine', Georgia, 'Times New Roman', serif;
    --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-cream);
    font-family: var(--font-body);
    color: var(--navy);
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

/* BACKGROUND PARTICLES */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.main-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 90px 24px;
}

/* TOP HEADER */
.hero-header {
    text-align: center;
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 24px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(11, 25, 44, 0.05);
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.hero-header .kicker {
    font-family: var(--font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.hero-header h1 {
    font-family: var(--font-heading);
    font-size: 52px;
    margin: 0 0 6px 0;
    color: #000000;
}

.hero-header p {
    font-family: var(--font-body);
    font-size: 13.5px;
    color: #475569;
    margin: 0;
}

/* FREEDOM WALL FULL SCREEN LAYOUT */
.freedom-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
}

@media (max-width: 768px) {
    .main-wrapper {
        padding-top: 24px;
    }

    .hero-header h1 {
        font-size: 42px;
    }
}

@media (max-width: 560px) {
    .hero-header h1 {
        font-size: 34px;
    }
}

@media (max-width: 360px) {
    .hero-header h1 {
        font-size: 30px;
    }
}

@media (max-width: 900px) {
    .freedom-layout {
        flex-direction: column;
    }
}

/* COMPOSER FORM */
.composer-card {
    width: 350px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(11, 25, 44, 0.06);
    position: sticky;
    top: 20px;
    z-index: 10;
}

@media (max-width: 900px) {
    .composer-card {
        width: 100%;
        position: relative;
        top: 0;
    }
}

.composer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--navy);
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 14px;
}

#googleAccountControls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 12px;
}

#googleAccountControls[hidden] {
    display: none;
}

#googleAccountControls button {
    border: 1px solid rgba(11, 25, 44, 0.2);
    border-radius: 7px;
    padding: 6px 9px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    cursor: pointer;
}

#googleAccountControls button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(11, 25, 44, 0.15);
    background: #faf8f5;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--navy);
    outline: none;
    transition: all 0.25s ease;
}

.form-group textarea {
    height: 90px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: #ffffff;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* COLOR PALETTE SELECTOR — liturgical-inspired */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.color-option {
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.color-option:hover {
    transform: translateY(-2px);
}

.color-option.selected {
    border-color: var(--navy);
    box-shadow: 0 0 0 2px var(--gold);
}

.color-amber {
    background: #fffdf5;
    border-top: 3px solid #d4af37;
}
.color-crimson {
    background: #fff5f5;
    border-top: 3px solid #a91d22;
}
.color-marble {
    background: #f8fafc;
    border-top: 3px solid #64748b;
}
.color-velvet {
    background: #f0f4f8;
    border-top: 3px solid #0b192c;
}
.color-emerald {
    background: #f4fbf6;
    border-top: 3px solid #1e7a4c;
}
.color-violet {
    background: #f8f5fc;
    border-top: 3px solid #6b3fa0;
}
.color-rose {
    background: #fdf5f8;
    border-top: 3px solid #c2568a;
}
.color-ivory {
    background: #fffdf7;
    border-top: 3px solid #b8935a;
}

/* SHAPE SELECTOR */
.shape-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.shape-option {
    padding: 10px 8px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--navy);
    background: #faf8f5;
    border: 2px solid rgba(11, 25, 44, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.shape-option:hover {
    transform: translateY(-2px);
}

.shape-option.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.char-count {
    font-family: var(--font-body);
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    background: var(--navy);
    color: var(--gold-light);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--navy-light);
    box-shadow: 0 6px 16px rgba(11, 25, 44, 0.2);
    transform: translateY(-2px);
}

/* WALL GRID */
.wall-container {
    flex-grow: 1;
    width: 100%;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(11, 25, 44, 0.1);
}

.board-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin: 0;
    color: var(--navy);
}

.message-badge {
    background: rgba(212, 175, 55, 0.2);
    color: #725710;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}

.freedom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    padding-top: 15px;
}

/* BASE NOTE CARD */
.note-card {
    position: relative;
    padding: 26px 22px 22px 22px;
    box-shadow: 0 8px 24px rgba(11, 25, 44, 0.08);
    animation: floatMotion 5s ease-in-out infinite alternate;
    transition: all 0.3s ease;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
    border-left-width: 5px !important;
    border-right-width: 5px !important;
}

/* SHAPE VARIANTS */
.note-card.shape-scroll {
    border-radius: 45px 12px 45px 12px !important;
}

.note-card.shape-rectangle {
    border-radius: 10px !important;
}

.note-card:nth-child(2n) {
    animation: floatMotionAlt 6s ease-in-out infinite alternate;
}
.note-card:nth-child(3n) {
    animation: floatMotionRot 7s ease-in-out infinite alternate;
}

@keyframes floatMotion {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-8px);
    }
}
@keyframes floatMotionAlt {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(8px);
    }
}
@keyframes floatMotionRot {
    0% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(6px);
    }
}

.note-card:hover {
    box-shadow: 0 16px 36px rgba(11, 25, 44, 0.16);
    border-color: rgba(212, 175, 55, 0.85) !important;
    animation-play-state: paused;
    z-index: 5;
}

/* COLOR THEMES WITH CUSTOM BORDER ACCENTS */
.card-theme-amber {
    background: #fffdf5 !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
}
.card-theme-crimson {
    background: #fff6f6 !important;
    border-color: rgba(169, 29, 34, 0.35) !important;
}
.card-theme-marble {
    background: #f8fafc !important;
    border-color: rgba(100, 116, 139, 0.35) !important;
}
.card-theme-velvet {
    background: #f0f4f8 !important;
    border-color: rgba(11, 25, 44, 0.35) !important;
}
.card-theme-emerald {
    background: #f4fbf6 !important;
    border-color: rgba(30, 122, 76, 0.4) !important;
}
.card-theme-violet {
    background: #f8f5fc !important;
    border-color: rgba(107, 63, 160, 0.4) !important;
}
.card-theme-rose {
    background: #fdf5f8 !important;
    border-color: rgba(194, 86, 138, 0.4) !important;
}
.card-theme-ivory {
    background: #fffdf7 !important;
    border-color: rgba(184, 147, 90, 0.45) !important;
}

/* NEW BADGE */
.new-hint-badge {
    position: absolute;
    top: 14px;
    right: 22px;
    background: var(--red-accent);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.25);
    z-index: 2;
}

.note-card h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    margin: 0 0 8px 0;
    color: var(--navy) !important;
    font-weight: 700;
}

.note-card p {
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155 !important;
    margin: 0 0 14px 0;
    word-wrap: break-word;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: #475569 !important;
    padding-top: 10px;
    border-top: 1px dashed rgba(11, 25, 44, 0.12);
    font-weight: 500;
}

.like-btn {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #a17c10;
    border-radius: 50px;
    padding: 4px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-btn.liked {
    background: var(--red-accent);
    color: #ffffff;
    border-color: var(--red-accent);
}

.card-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.action-btn {
    background: transparent;
    border: none;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.action-btn:hover {
    color: var(--navy);
    text-decoration: underline;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    color: #64748b;
    font-family: var(--font-body);
    font-weight: 500;
}

.editing-banner {
    display: none;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    color: #92400e;
    margin-bottom: 12px;
    justify-content: space-between;
    align-items: center;
}

.editing-banner.active {
    display: flex;
}

.cancel-btn {
    background: transparent;
    border: none;
    color: #92400e;
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
}

/* CONFIRM MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 25, 44, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 20px;
    padding: 28px 26px 22px;
    width: 340px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 24px 55px rgba(11, 25, 44, 0.3);
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.modal-overlay.show .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.12);
    color: var(--red-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.modal-box h3 {
    font-family: var(--font-heading);
    font-size: 19px;
    margin: 0 0 8px;
    color: var(--navy);
}

.modal-box p {
    font-family: var(--font-body);
    font-size: 13.5px;
    color: #475569;
    margin: 0 0 22px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    padding: 11px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    background: #f1f5f9;
    color: var(--navy);
}

.modal-btn-cancel:hover {
    background: #e2e8f0;
}

.modal-btn-confirm {
    background: var(--red-accent);
    color: #ffffff;
}

.modal-btn-confirm:hover {
    background: #cf3c2c;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}
