/* Global Styles */
:root {
    --primary-color: #3a2618;
    --secondary-color: #8b4513;
    --accent-color: #5d4037;
    --text-color: #3e2723;
    --light-text: #f5f5f5;
    --page-color: #f9f5e7;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --aged-color: #e8dcb5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Crimson Text', serif;
}

body {
    background-color: #1a1a1a;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(40, 20, 10, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(60, 30, 15, 0.6) 0%, transparent 20%);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--page-color);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid var(--secondary-color);
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--secondary-color);
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.8);
}

button {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Bookmark Styles */
.bookmark {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark:hover {
    transform: translateY(-5px);
}

.bookmark-tab {
    width: 40px;
    height: 20px;
    background-color: #8b0000;
    border-radius: 5px 5px 0 0;
    margin: 0 auto;
}

.bookmark-body {
    width: 120px;
    height: 30px;
    background-color: #8b0000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light-text);
    font-weight: 600;
    border-radius: 0 0 5px 5px;
    padding: 5px;
    text-align: center;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 1s ease-out;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}