:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-family);
    color: var(--text-color);
    background-image: url('https://i.imghippo.com/files/nixT8387zc.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 0;
    pointer-events: none;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
}

.crt-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 10000;
    pointer-events: none;
}

.crt-overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.05);
    opacity: 0;
    z-index: 10001;
    pointer-events: none;
    animation: crtFlicker 0.15s infinite;
}

@keyframes crtFlicker {
    0% { opacity: 0.1235; }
    5% { opacity: 0.0892; }
    10% { opacity: 0.1451; }
    15% { opacity: 0.0921; }
    20% { opacity: 0.1211; }
    25% { opacity: 0.0811; }
    30% { opacity: 0.1152; }
    35% { opacity: 0.1221; }
    40% { opacity: 0.0982; }
    45% { opacity: 0.1331; }
    50% { opacity: 0.1111; }
    55% { opacity: 0.0872; }
    60% { opacity: 0.1441; }
    65% { opacity: 0.1021; }
    70% { opacity: 0.1261; }
    75% { opacity: 0.0841; }
    80% { opacity: 0.1192; }
    85% { opacity: 0.1251; }
    90% { opacity: 0.1012; }
    95% { opacity: 0.1361; }
    100% { opacity: 0.1141; }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.crt-overlay::after {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 100%
    );
    height: 100px;
    top: -100px;
    animation: scanline 8s linear infinite;
}

.top-left-card {
    position: fixed;
    top: 5vh;
    left: 40px;
    width: 90%;
    max-width: 700px;
    height: 85vh;
    background-color: #d1b785;
    border: 2px solid #443426;
    border-radius: 12px;
    padding: 0 35px;
    z-index: 10;
    box-shadow: 0 0 15px #8d663f, 0 0 30px rgba(141, 102, 63, 0.3), 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #443426 #d1b785;
}

.top-left-card::-webkit-scrollbar {
    width: 10px;
}
.top-left-card::-webkit-scrollbar-track {
    background: #d1b785;
    border-radius: 0 12px 12px 0;
}
.top-left-card::-webkit-scrollbar-thumb {
    background-color: #443426;
    border: 2px solid #d1b785;
    border-radius: 10px;
}

.warning-notice {
    background-color: #f7e1c1;
    border: 2px dashed #9c7750;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
    color: #443426;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 2px 2px 0px #9c7750;
}

.warning-header {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #9c7750;
    text-align: center;
    border-bottom: 1px solid rgba(156, 119, 80, 0.3);
    padding-bottom: 4px;
}

.inner-image {
    width: 100%;
    min-height: 100%;
    background-image: url('https://i.imghippo.com/files/GWME9266kVE.webp');
    background-repeat: repeat;
    background-size: 40px;
    border-left: 1px dashed #443426;
    border-right: 1px dashed #443426;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px 20px;
    position: relative;
}

.inner-image::before,
.inner-image::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35px;
    background-image: url('https://api.imghippo.com/files/Tng4008rbI.webp');
    background-repeat: repeat-y;
    background-size: 100% auto;
    z-index: 20;
    pointer-events: none;
}

.inner-image::before {
    left: -35px;
    transform: scaleX(-1);
}

.inner-image::after {
    right: -35px;
}

.blog-stats-header {
    background: #443426;
    color: #ffe9cf;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    border: 1px solid #9c7750;
    box-shadow: 2px 2px 0px #9c7750;
    letter-spacing: 1px;
    font-weight: bold;
}

.blog-box {
    width: 100%;
    height: 380px;
    background-color: #ffe9cf;
    border: 2px solid #443426;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    font-family: 'Fira Code', monospace;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.blog-header {
    background-color: #9c7750;
    color: #ffe9cf;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: bold;
    border-bottom: 2px solid #443426;
    text-transform: lowercase;
}

.blog-content {
    flex-grow: 1;
    padding: 15px;
    color: #443426;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #443426 #ffe9cf;
}

.diary-text {
    font-size: 0.85rem;
    line-height: 1.5;
}

.diary-text p {
    margin-bottom: 15px;
}

.diary-text a {
    color: #904620;
    text-decoration: underline;
    font-weight: bold;
}

.entry-images {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.entry-images img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid #443426;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.entry-images img:hover {
    transform: scale(1.05);
}

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

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid #ffe9cf;
    border-radius: 12px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.diary-footer {
    font-style: italic;
    opacity: 0.9;
    margin-top: 10px;
    font-size: 0.75rem;
}

.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: auto;
    cursor: pointer;
    z-index: 100;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.scroll-top-btn:hover {
    transform: scale(1.1) translateY(-5px);
}

.scroll-top-btn.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.home-nav-button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #443426;
    color: #ffe9cf;
    padding: 25px 12px;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border-radius: 15px 0 0 15px;
    border: 2px solid #ffe9cf;
    border-right: none;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -4px 0 15px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-nav-button:hover {
    padding-right: 25px;
    background: #9c7750;
    color: #ffffff;
}

.home-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2c1e14; /* Fallback */
}

.home-container {
    z-index: 10;
    width: 90%;
    max-width: 450px;
    animation: homeFadeIn 0.8s ease-out;
}

.home-card {
    background-color: #d1b785;
    border: 3px solid #443426;
    border-radius: 25px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6), inset 0 0 40px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    background-image: url('https://i.imghippo.com/files/GWME9266kVE.webp');
    background-repeat: repeat;
    background-size: 60px;
}

.home-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 25px;
    background-image: url('https://api.imghippo.com/files/Tng4008rbI.webp');
    background-repeat: repeat-y;
    background-size: 100% auto;
    opacity: 0.8;
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 25px;
    background-image: url('https://api.imghippo.com/files/Tng4008rbI.webp');
    background-repeat: repeat-y;
    background-size: 100% auto;
    transform: scaleX(-1);
    opacity: 0.8;
}

.profile-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 25px;
    border: 5px solid #443426;
    border-radius: 50%;
    overflow: hidden;
    background: #ffe9cf;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    position: relative;
    z-index: 5;
}

.home-profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-title {
    font-family: 'Fira Code', monospace;
    color: #443426;
    font-size: 1.8rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 5;
    text-shadow: 1px 1px 0px #ffe9cf;
}

.home-subtitle {
    font-family: 'Fira Code', monospace;
    color: #5d4633;
    font-size: 0.85rem;
    margin-bottom: 35px;
    line-height: 1.5;
    position: relative;
    z-index: 5;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.home-enter-btn {
    display: inline-block;
    background: #443426;
    color: #ffe9cf;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid #443426;
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.home-enter-btn:hover {
    background: #ffe9cf;
    color: #443426;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.home-footer-decor {
    margin-top: 30px;
    color: #443426;
    font-size: 0.8rem;
    opacity: 0.7;
    position: relative;
    z-index: 5;
}

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

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

.blog-content::-webkit-scrollbar {
    width: 6px;
}
.blog-content::-webkit-scrollbar-track {
    background: #ffe9cf;
}
.blog-content::-webkit-scrollbar-thumb {
    background-color: #443426;
    border: 1px solid #ffe9cf;
}