:root {
    --bg-color: #0b0c10;
    --text-color: #c5c6c7;
    --gold: #d4af37;
    --gold-dark: #aa8529;
    --border-glow: rgba(212, 175, 55, 0.3);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Limelight', cursive;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    overflow-x: hidden;
}

h1, h2, h3 {
    color: var(--gold);
    text-align: center;
    text-shadow: 1px 1px 2px #000;
}

h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-top: 1rem; margin-bottom: 0.5rem; }

.font-sue { font-family: 'Sue Ellen Francisco', cursive; font-size: 1.8rem; }
.font-qwitcher { font-family: 'Qwitcher Grypen', cursive; font-size: 2.2rem; }
.font-italianno { font-family: 'Italianno', cursive; font-size: 2.2rem; }

#app {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.view {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.view.active {
    display: block;
}

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

.container, .auth-container {
    padding: 2rem 1.5rem;
    background: rgba(15, 15, 20, 0.9);
    border-radius: 4px;
}

.border-gold {
    border: 2px solid var(--gold);
    box-shadow: 0 0 10px var(--border-glow), inset 0 0 10px var(--border-glow);
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

input, textarea, select {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #eee;
    padding: 0.8rem;
    margin-bottom: 1rem;
    font-family: inherit;
    border-radius: 2px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 5px var(--border-glow);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

button {
    cursor: pointer;
    font-family: 'Limelight', cursive;
    transition: all 0.3s;
}

.gold-btn {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(212,175,55,0) 100%);
}

.gold-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 15px var(--border-glow);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-color);
    text-decoration: underline;
}

.text-btn:hover {
    color: var(--gold);
}

.error {
    color: #ff4a4a;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.entries-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) #111;
}

.entries-container::-webkit-scrollbar {
    width: 6px;
}
.entries-container::-webkit-scrollbar-track {
    background: #111; 
}
.entries-container::-webkit-scrollbar-thumb {
    background: var(--gold); 
}

.entry {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(20, 20, 25, 0.8);
    border-left: 2px solid var(--gold-dark);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.entry-content {
    color: #fff;
    white-space: pre-wrap;
    line-height: 1.4;
}

.card {
    padding: 1.5rem;
    background: #1a1a1a;
    margin-bottom: 1rem;
}

.waiting-text {
    font-style: italic;
    color: #888;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.char-btn {
    display: block;
    margin: 1rem auto;
    width: 80%;
}
