:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --secondary-bg: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.login-input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.login-input-group input::placeholder {
    opacity: 0.7;
}

.login-input-group input:focus {
    border-color: var(--accent);
}

.error-text {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 1rem;
}

.container {
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    margin-bottom: 3rem;
    text-align: left;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.small-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

#current-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.entry-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.entry-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

textarea {
    width: 100%;
    min-height: 120px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    outline: none;
    margin-bottom: 1rem;
}

textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.secondary-btn {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background: var(--hover-bg);
}

#image-preview-container {
    position: relative;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

#image-preview {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

#remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    font-size: 20px;
}

#remove-image-btn:hover {
    background: #ff4444;
}

button {
    background: var(--accent);
    color: var(--bg-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

button:active {
    transform: translateY(0);
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.diary-entry {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.entry-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.edited-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}

.entry-content {
    font-size: 1.1rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 1rem;
}

.entry-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--border);
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn,
.delete-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 4px 8px;
    opacity: 0;
    transition: var(--transition);
}

.diary-entry:hover .delete-btn,
.diary-entry:hover .edit-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: #ff4444;
    box-shadow: none;
    transform: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}