/* ==========================================
   FONT IMPORTS
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Tangerine:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600&display=swap');

/* ==========================================
   BASE STYLING
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background-color: #f0e6d2;
    color: #3c2f2f;
    line-height: 1.6;
    padding: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f0e6d2"/><path d="M0 0L100 100M100 0L0 100" stroke="%23e6d7b8" stroke-width="1"/></svg>');
    background-size: 20px 20px;
}

/* ==========================================
   SCROLL COMPONENT STYLING
   ========================================== */
.scroll-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.scroll {
    width: 100%;
    max-width: 800px;
    position: relative;
    background-color: #f9f3e3;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.scroll-top {
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50"><path d="M0,50 C200,10 600,10 800,50" fill="%23f9f3e3" stroke="%23d9c7a6" stroke-width="2"/></svg>');
    background-size: 100% 100%;
}

.scroll-content {
    padding: 30px 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f9f3e3"/><path d="M25 0L25 100M50 0L50 100M75 0L75 100" stroke="%23f3edd9" stroke-width="1"/></svg>');
    background-size: 100px 100px;
    border-left: 1px solid #d9c7a6;
    border-right: 1px solid #d9c7a6;
}

.scroll-bottom {
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50"><path d="M0,0 C200,40 600,40 800,0" fill="%23f9f3e3" stroke="%23d9c7a6" stroke-width="2"/></svg>');
    background-size: 100% 100%;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.calligraphy-header {
    font-family: 'Tangerine', cursive;
    font-size: 5rem;
    text-align: center;
    color: #8b4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

h2 {
    font-family: 'Georgia', serif;
    color: #8b4513;
    margin: 1.5rem 0 1rem;
    border-bottom: 1px solid #d9c7a6;
    padding-bottom: 0.5rem;
}

/* Diablo-inspired subheader */
.diablo-subheader {
    font-family: 'Cinzel', serif;
    color: #8B0000;
    text-align: center;
    margin: 0.5rem auto 2rem;
    padding: 0.5rem;
    position: relative;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    letter-spacing: 0.5px;
    font-size: 1.4rem;
    line-height: 1.4;
    max-width: 90%;
    animation: subtle-pulse 3s infinite;
}

.index-header::before {
    content: "🧙";
    display: inline-block;
    margin: 0 0.5rem;
    color: #5a3921;
}

/* Pulsing animation for diablo subheader */
@keyframes subtle-pulse {
    0% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
    50% { text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
    100% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
}

/* ==========================================
   GUEST LIST STYLING
   ========================================== */
.guest-list {
    margin: 2rem 0;
}

/* Center the guest entries */
.guests-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.guest-entries {
    list-style-type: none;
    width: 90%;
    max-width: 600px;
    padding: 0;
}

.guest-entry {
    padding: 0.8rem 1rem;
    border-bottom: 1px dashed #d9c7a6;
    text-align: center;
    transition: background-color 0.3s;
}

.guest-entry:hover {
    background-color: rgba(217, 199, 166, 0.2);
}

.guest-link {
    text-decoration: none;
    color: #5a3921;
    display: block;
    transition: color 0.3s;
}

.guest-link:hover {
    color: #8b4513;
    text-decoration: none !important;
}

.guest-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 5px;
    position: relative;
    display: inline-block;
}

.guest-name::before {
    content: "⚔️";
    display: inline-block;
    margin-right: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
    vertical-align: middle;
}

.guest-was-here {
    font-style: italic;
    margin-right: 5px;
    text-decoration: none !important;
}

.guest-date {
    font-size: 0.9rem;
    color: #777;
    display: inline-block;
}

/* ==========================================
   API INFO SECTION
   ========================================== */
.api-info {
    background-color: #f5f0e5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: monospace;
    border: 1px solid #d9c7a6;
}

/* ==========================================
   UTILITY COMPONENTS
   ========================================== */
/* Empty state message */
.empty-message {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

/* Back link button */
.back-link {
    margin-top: 20px;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #8b4513;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.back-link a:hover {
    background-color: #5a3921;
}

/* ==========================================
   PROFILE CARD (Guest Detail Page)
   ========================================== */
.profile-card {
    max-width: 420px;
    margin: 0 auto;
    background-color: rgba(217, 199, 166, 0.25);
    border: 2px solid #d9c7a6;
    border-radius: 10px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.profile-avatar svg {
    width: 100%;
    height: 100%;
}

.profile-nickname {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #8b4513;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.profile-comment {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #3c2f2f;
    border-left: 3px solid #8b4513;
    padding: 10px 15px;
    margin: 0 auto 16px;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 0 6px 6px 0;
    max-width: 340px;
}

.profile-meta {
    font-size: 0.88rem;
    color: #777;
    margin-bottom: 14px;
}

.profile-views {
    font-size: 0.92rem;
    color: #5a3921;
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.5;
}

.views-icon {
    font-size: 1.1rem;
    margin-right: 3px;
    vertical-align: middle;
}

.profile-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, #d9c7a6, transparent);
    margin: 0 auto 14px;
}

.profile-api-hint {
    font-size: 0.78rem;
    color: #999;
}

.profile-api-hint code {
    font-family: monospace;
    font-size: 0.78rem;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    /* Scroll adjustments */
    .scroll-content {
        padding: 20px 30px;
    }
    
    /* Typography adjustments */
    .calligraphy-header {
        font-size: 3.5rem;
    }
    
    .diablo-subheader {
        font-size: 1.2rem;
    }
    
    /* API info adjustments */
    pre {
        font-size: 0.9rem;
    }
    
    /* Guest entry adjustments */
    .guest-entry {
        padding: 0.6rem;
    }
    
    .guest-name, 
    .guest-was-here, 
    .guest-date {
        display: block;
        margin: 0.2rem 0;
    }
    
    .guest-name::before {
        margin-right: 4px;
    }
}

@media (max-width: 480px) {
    /* Base adjustments */
    body {
        padding: 10px;
    }
    
    /* Scroll adjustments */
    .scroll-content {
        padding: 15px 20px;
    }
    
    /* Typography adjustments */
    .calligraphy-header {
        font-size: 2.5rem;
    }
    
    .diablo-subheader {
        font-size: 1rem;
    }
    
    /* Hide sword icon on small screens for subheader */
    .diablo-subheader::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 20px 15px;
    }

    .profile-nickname {
        font-size: 1.3rem;
    }

    .profile-comment {
        font-size: 1rem;
    }
}