:root {
    --bg-dark: #0a0a0a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --accent-color: #D4AF37;
    /* Dourado Elite Artegraf */
    --accent-dark: #b8952d;

    /* Cores de Notas Profissionais (Muted & Dark) */
    --note-yellow: #1e1b10;
    /* Champagne Escuro */
    --note-blue: #0f172a;
    /* Navy */
    --note-green: #061e12;
    /* Forest */
    --note-pink: #1e101a;
    /* Deep Plum */
    --note-black: #121212;
    /* Obsidian */
    --note-red: #1e0a0a;
    /* Deep Red */

    --dark-text: #fff;
    /* Agora o texto é sempre claro nos cards dark */
    --light-text: #f5f5f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: white;
    min-height: 100vh;
}

.container {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

/* Glassmorphism Header */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-install-premium {
    background: linear-gradient(90deg, #D4AF37, #b8952d);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #000;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    animation: pulseInstall 2s infinite;
}

@keyframes pulseInstall {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.gradient-text {
    background: linear-gradient(90deg, #fff, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    font-weight: 800;
}

.tagline-premium {
    font-size: 0.55rem;
    color: #666;
    margin-top: 2px;
    font-weight: 600;
    letter-spacing: 1.2px;
    opacity: 0.8;
}

.brand-group {
    display: flex;
    flex-direction: column;
}

.btn-icon-round {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
}

.btn-icon-round:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Home Styles */
.btn-main-create {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #1e1e1e, #000);
    border: 1px solid var(--accent-color);
    border-radius: 24px;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 40px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

.btn-main-create:hover {
    background: var(--accent-color);
    color: #000;
}

.btn-main-create:active {
    transform: scale(0.96);
}

.home-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 20px;
}

/* Folder Grid */
.folders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.folder-card {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
}

.folder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
}

.folder-card:hover {
    background: #262626;
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.3);
}

.btn-pin {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.btn-pin:hover {
    opacity: 1;
    transform: scale(1.2);
}

.folder-card.pinned .btn-pin {
    opacity: 1;
}

.btn-edit-folder {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.btn-edit-folder:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-lock {
    position: absolute;
    top: 10px;
    left: 40px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.btn-lock:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-del-folder {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 20, 147, 0.1);
    border: 1px solid rgba(255, 20, 147, 0.5);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #ff1493;
    text-shadow: 0 0 5px #ff1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.3);
    transition: all 0.3s;
    z-index: 5;
}

.btn-del-folder:hover {
    background: #ff1493;
    color: white;
    box-shadow: 0 0 20px #ff1493;
    transform: scale(1.1);
}

.folder-card:active {
    transform: scale(0.95);
    background: #333;
}

.folder-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
}

.folder-card p {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Tela Interna da Gaveta */
.folder-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-icon {
    background: var(--glass-bg);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.btn-toggle-editor {
    width: 100%;
    padding: 16px;
    background: rgba(212, 175, 55, 0.05);
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.btn-toggle-editor:hover,
.btn-toggle-editor:active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    color: #000;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-toggle-editor.active {
    border-style: solid;
    background: rgba(168, 85, 247, 0.1);
}

.notepad-container {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideDownIn 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideDownIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.color-picker-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.color-dots-wrapper {
    display: flex;
    gap: 8px;
}

.note-type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.btn-type {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.4;
    transition: 0.3s;
}

/* --- SELETOR DE ESTILO PREMIUM --- */
.style-selector-premium {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.label-mini {
    font-size: 0.65rem;
    color: #666;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.style-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-style {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-style.selected {
    background: white;
    color: black;
    border-color: white;
    font-weight: 700;
}

/* --- CLASSES DE ACABAMENTO PREMIUM --- */
.note-card.card-style-glass {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.note-card.card-style-neon {
    border: 2px solid #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(0, 243, 255, 0.2);
    background: rgba(0, 20, 30, 0.8) !important;
    color: #fff !important;
}

.note-card.card-style-gold {
    background: linear-gradient(135deg, #262626 0%, #0a0a0a 100%) !important;
    border: 2px solid #D4AF37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    color: #D4AF37 !important;
}

.note-card.card-style-gold .note-footer {
    border-top-color: rgba(212, 175, 55, 0.2);
    color: rgba(212, 175, 55, 0.6);
}

.note-card.card-style-gold .btn-action-note {
    color: #D4AF37;
}

.btn-type.active {
    background: var(--accent-color);
    opacity: 1;
}

.btn-voice.recording {
    background: #ef4444;
    opacity: 1;
    animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-dot.selected {
    border-color: white;
    transform: scale(1.1);
}

textarea {
    width: 100%;
    height: 60px;
    /* Ainda mais compacto */
    background: transparent;
    border: none;
    color: #eee;
    font-size: 1rem;
    outline: none;
    resize: none;
    margin-top: 8px;
}

textarea::placeholder {
    color: #555;
    font-size: 0.9rem;
}

.btn-save-assunto {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #D4AF37, #b8952d);
    border: none;
    border-radius: 14px;
    color: #000;
    font-weight: 800;
    margin-top: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(212, 175, 55, 0.2);
}

.btn-save-assunto:active {
    transform: scale(0.96);
    box-shadow: 0 4px 8px rgba(168, 85, 247, 0.2);
}

/* Notas estilo Color Note */
.saved-notes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.note-card {
    background: var(--note-yellow);
    color: var(--dark-text);
    padding: 15px;
    border-radius: 12px;
    min-height: 110px;
    font-size: 0.95rem;
    font-weight: 400;
    /* Texto mais fino e elegante */
    line-height: 1.5;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Borda sutil */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.note-card:active {
    transform: scale(0.98);
}

.note-card.pinned {
    outline: 2px solid rgba(255, 255, 255, 0.3);
}

.note-text {
    display: block;
    word-break: break-word;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    cursor: pointer;
}

.checklist-item.checked {
    text-decoration: line-through;
    opacity: 0.5;
}

.checklist-item span {
    pointer-events: none;
}

.checklist-chk {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    accent-color: var(--accent-color);
}

.note-card.color-blue {
    background: var(--note-blue);
}

.note-card.color-green {
    background: var(--note-green);
}

.note-card.color-pink {
    background: var(--note-pink);
}

.note-card.color-black {
    background: var(--note-black);
    color: var(--light-text);
}

.note-card.color-black .note-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #888;
}

.note-card.color-red {
    background: var(--note-red);
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
}

.note-actions {
    display: flex;
    gap: 12px;
}

.btn-action-note {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px;
    transition: transform 0.2s;
    opacity: 0.6;
}

.btn-action-note:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    transition: 0.3s;
    z-index: 100;
}

/* --- MODAL CUSTOMIZADO PREMIUM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#modal-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

#modal-message {
    color: #aaa;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 12px;
    color: white;
    margin-bottom: 20px;
    outline: none;
    transition: 0.3s;
}

.modal-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-modal.primary {
    background: linear-gradient(90deg, #a855f7, #ec4899);
    color: white;
}

.btn-modal.secondary {
    background: #333;
    color: #fff;
}

.btn-modal:active {
    transform: scale(0.95);
}

/* UTILS */
.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}