/* Cover Page Styles */
.diary-cover {
    width: 600px;
    height: 800px;
    background: 
        linear-gradient(135deg, #5d4037 0%, #3e2723 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.1"><path fill="%23000" d="M50,0 C77.614,0 100,22.386 100,50 C100,77.614 77.614,100 50,100 C22.386,100 0,77.614 0,50 C0,22.386 22.386,0 50,0 Z" /></svg>');
    background-blend-mode: overlay;
    border-radius: 15px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        inset 0 2px 10px rgba(139, 69, 19, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 15px solid #2e1a12;
    overflow: visible;
    cursor: pointer;
    transition: all 0.6s ease;
    transform-style: preserve-3d;
    z-index: 1;
}

.diary-cover:hover {
    transform: rotateY(-5deg) rotateX(2deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.9),
        inset 0 2px 15px rgba(139, 69, 19, 0.4);
}

.diary-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(101, 67, 33, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.cover-text {
    text-align: center;
    color: #d7ccc8;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.cover-text h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: 3px;
    font-weight: 700;
    font-family: 'Creepster', cursive;
    color: #d4af37;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(212, 175, 55, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.cover-text .subtitle {
    font-size: 1.2rem;
    font-style: italic;
    letter-spacing: 2px;
    color: #d7ccc8;
    opacity: 0.9;
}

@keyframes titleGlow {
    0% { 
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.8),
            0 0 20px rgba(212, 175, 55, 0.5);
    }
    100% { 
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.8),
            0 0 30px rgba(212, 175, 55, 0.8);
    }
}

.bookmark-container {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    z-index: 10;
}

.cover-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sigil {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.sigil-1 {
    top: 20%;
    left: 15%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23d7ccc8" d="M50,10 C70,10 85,25 85,45 C85,65 70,80 50,80 C30,80 15,65 15,45 C15,25 30,10 50,10 Z M50,30 C40,30 32,38 32,48 C32,58 40,66 50,66 C60,66 68,58 68,48 C68,38 60,30 50,30 Z"/></svg>');
}

.sigil-2 {
    bottom: 25%;
    right: 20%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23d7ccc8" d="M50,10 L60,40 L90,40 L65,60 L75,90 L50,70 L25,90 L35,60 L10,40 L40,40 Z"/></svg>');
}

.sigil-3 {
    top: 40%;
    right: 15%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23d7ccc8" d="M50,10 C60,10 70,15 75,25 C80,35 80,45 75,55 C70,65 60,70 50,70 C40,70 30,65 25,55 C20,45 20,35 25,25 C30,15 40,10 50,10 Z M50,30 C45,30 40,35 40,40 C40,45 45,50 50,50 C55,50 60,45 60,40 C60,35 55,30 50,30 Z"/></svg>');
}

/* Ambient glow effect */
.container {
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 1000px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: ambientGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes ambientGlow {
    0% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(0.9); 
    }
    100% { 
        opacity: 0.6; 
        transform: translate(-50%, -50%) scale(1.1); 
    }
}

/* Click hint */
.diary-cover::after {
    content: 'Click anywhere to enter...';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: #d4af37;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: bold;
    opacity: 0.9;
    animation: clickHint 2s ease-in-out infinite;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    background: rgba(44, 24, 16, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #d4af37;
}

@keyframes clickHint {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Enhanced Modal Styles for Cover Page */
.modal {
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 2px solid #d4af37;
    border-radius: 15px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        inset 0 2px 10px rgba(212, 175, 55, 0.1);
    color: #d7ccc8;
}

.modal h2 {
    font-family: 'Creepster', cursive;
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    color: #d4af37;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"] {
    background: rgba(244, 241, 232, 0.9);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 1rem;
    color: #2c1810;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    background: rgba(244, 241, 232, 1);
}

.form-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.modal button {
    background: linear-gradient(145deg, #d4af37, #b8941f);
    color: #2c1810;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    font-family: 'Butcherman', cursive;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    background: linear-gradient(145deg, #e6c547, #d4af37);
}

#close-modal {
    background: linear-gradient(145deg, #8B4513, #654321);
    color: #f5f5f5;
}

#close-modal:hover {
    background: linear-gradient(145deg, #A0522D, #8B4513);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

/* Responsive Cover */
@media (max-width: 768px) {
    .diary-cover {
        width: 90vw;
        height: 120vw;
        max-height: 600px;
    }
    
    .cover-text h1 {
        font-size: 2.5rem;
    }
    
    .cover-text .subtitle {
        font-size: 1rem;
    }
    
    .container::before {
        width: 100vw;
        height: 120vh;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal h2 {
        font-size: 1.5rem;
    }
}