/* --- Base Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background-color: #fce4ec; /* Very light pink background */
    color: #4a4a4a; /* Dark grey for general text */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; /* For background effects */
    overflow-x: hidden; /* Prevent horizontal scroll from background */
}

/* --- Background Animation (Subtle Grid/Network Effect) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to right, rgba(240, 98, 146, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(240, 98, 146, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; /* Size of the grid cells */
    opacity: 0.3;
    z-index: -1; /* Behind content */
    animation: backgroundPulse 10s infinite alternate; /* Subtle pulsing */
}

@keyframes backgroundPulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.4; }
}

/* --- Glowing Text Effect - Adapted for Light Theme --- */
.glowing-red {
    color: #e91e63; /* Deeper pink-red */
    text-shadow: 0 0 3px #e91e63, 0 0 8px #e91e63, 0 0 12px #e91e63;
    transition: text-shadow 0.3s ease-in-out;
}
.glowing-pink {
    color: #f06292; /* Brighter, softer pink */
    text-shadow: 0 0 3px #f06292, 0 0 8px #f06292, 0 0 12px #f06292;
    transition: text-shadow 0.3s ease-in-out;
}
/* Hover effect for glowing text */
.glowing-red:hover, .glowing-pink:hover {
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
}

/* --- Header Styling --- */
header {
    background-color: #f8bbd0; /* Medium pink for header */
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 5px solid #e91e63; /* Deeper pink line */
    position: relative; /* For header glow */
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.3); /* Subtle glow */
    transition: box-shadow 0.3s ease-in-out; /* Smooth transition for scroll effect */
}
header.scrolled { /* Class added by JS on scroll */
    box-shadow: 0 0 25px rgba(233, 30, 99, 0.6);
}
header h1 {
    margin: 0;
    font-size: 3em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e91e63; /* Deeper pink for title */
    text-shadow: 0 0 5px #e91e63, 0 0 10px #e91e63;
}
header p {
    font-size: 1.2em;
    margin-top: 0.5rem;
    font-style: italic;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    color: #f06292; /* Softer pink for subtitle */
    text-shadow: 0 0 2px #f06292;
}

/* --- Container and Article Styling --- */
.container {
    width: 70%;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    padding: 2rem 0;
    flex-grow: 1;
}
article {
    background-color: #fff; /* White background for content */
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.3); /* Enhanced glow around article */
    margin-bottom: 2rem;
    position: relative; /* For subtle hover effect */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
article:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 5px 25px rgba(233, 30, 99, 0.5); /* Stronger glow on hover */
}
/* Specific styling for the directory view article */
article.directory-view {
    font-family: 'monospace', 'Courier New', Courier, monospace; /* Hacker-style font for directory */
    background-color: #2a2a2a; /* Darker background for directory view */
    color: #e0e0e0; /* Light text for directory view */
    box-shadow: 0 0 25px rgba(233, 30, 99, 0.5); /* Stronger glow */
    padding: 2rem;
}
article.directory-view .post-meta {
    color: #aaa;
    border-bottom-color: #e91e63;
}
article.directory-view h2 {
    color: #f06292;
    text-shadow: 0 0 5px #f06292;
    margin-bottom: 1.5rem;
}


/* --- List Styling (Existing, but not used on directory page) --- */
ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
ul li {
    background-color: #fff;
    border: 1px solid #f8bbd0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.1);
    transition: all 0.3s ease-in-out;
    position: relative;
    padding-left: 2.5rem;
}
ul li::before {
    content: '>';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #e91e63;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 0 5px #e91e63;
}
ul li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
    border-color: #e91e63;
}

/* --- Call to Action Styling --- */
.call-to-action {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.2em;
    font-weight: bold;
    color: #e91e63;
    text-shadow: 0 0 3px #e91e63;
}
.call-to-action a {
    display: inline-block;
    background-color: #e91e63; /* Deeper pink button */
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.4);
}
.call-to-action a:hover {
    background-color: #f06292; /* Softer pink on hover */
    box-shadow: 0 0 15px rgba(240, 98, 146, 0.6);
    transform: scale(1.05); /* Subtle grow effect on hover */
}

/* --- Footer Styling --- */
footer {
    background-color: #f8bbd0; /* Medium pink for footer */
    color: #e91e63; /* Deeper pink for footer text */
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 5px solid #e91e63;
    text-shadow: 0 0 2px #e91e63;
}
footer p {
    text-align: center;
    margin: 0;
}

/* --- Marquee Styling (JavaScript driven) --- */
.hacker-marquee {
    background-color: #e91e63; /* Deeper pink for marquee background */
    color: #fff;
    padding: 0.5rem 0;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.6);
    font-family: 'monospace', 'Courier New', Courier, monospace; /* Hacker-style font */
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 5px #fff; /* White glow for marquee text */
    position: relative;
    height: 1.5em; /* Fixed height to prevent content jump */
    cursor: pointer;
}
.hacker-marquee-content {
    position: absolute; /* Positioned for JS to control 'left' */
    white-space: nowrap;
    left: 0; /* JS will manage this */
    top: 0;
    line-height: 1.5em; /* Match parent height */
    transition: text-shadow 0.1s ease-in-out; /* Smooth glow transition */
}
.hacker-marquee-content:hover {
    text-shadow: 0 0 8px #fff, 0 0 15px #fff; /* Stronger glow on hover */
}

/* --- Directory Tree Specific Styles --- */
.directory-tree {
    margin-top: 2rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(240, 98, 146, 0.5); /* Vertical line for the tree */
}

.dir-item, .file-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dir-item:hover, .file-item:hover {
    background-color: rgba(240, 98, 146, 0.1); /* Light pink highlight on hover */
    color: #f06292; /* Pink text on hover */
}

.dir-toggle {
    font-size: 0.8em;
    margin-right: 0.5rem;
    width: 1em; /* Fixed width for alignment */
    text-align: center;
    color: #e91e63; /* Deeper pink for toggle */
    text-shadow: 0 0 5px #e91e63;
}

.dir-name, .file-name {
    font-weight: bold;
    color: #f06292; /* Softer pink for names */
    text-shadow: 0 0 3px #f06292;
}

.file-icon {
    margin-right: 0.5rem;
    color: #e91e63; /* Deeper pink for file icon */
    text-shadow: 0 0 3px #e91e63;
}

.dir-content {
    margin-left: 1.5rem; /* Indent for nested directories */
    border-left: 1px dashed rgba(240, 98, 146, 0.3); /* Dashed line for sub-directories */
    padding-left: 0.5rem;
    overflow: hidden; /* For collapse animation */
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.dir-content.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none; /* Disable interaction when hidden */
}

.dir-item.open > .dir-toggle {
    transform: rotate(0deg); /* Reset rotation for open state */
}
.dir-item:not(.open) > .dir-toggle {
    transform: rotate(90deg); /* Rotate for closed state */
}

/* Group Details Panel */
.group-details {
    background-color: #3a3a3a; /* Darker background for details */
    border: 1px solid #e91e63;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.4);
    color: #e0e0e0;
}
.group-details h3 {
    color: #f06292;
    text-shadow: 0 0 5px #f06292;
    border-bottom: 1px solid #e91e63;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.group-details p {
    color: #ccc;
    font-size: 0.95em;
}
.group-details .call-to-action {
    margin-top: 1.5rem;
}
.group-details .call-to-action a {
    padding: 0.8rem 1.5rem;
    font-size: 1em;
}

/* New Group Prompt */
.new-group-prompt {
    margin-top: 1.5rem;
    border-top: 1px dashed rgba(240, 98, 146, 0.3);
    padding-top: 1rem;
}
.new-group-prompt .file-icon {
    font-size: 1.5em;
    line-height: 1;
}

/* --- Responsive Design (Mobile Support) --- */
@media (max-width: 768px) {
    /* Adjust container width for smaller screens */
    .container {
        width: 95%;
        padding: 1rem 0;
    }

    /* Header adjustments */
    header h1 {
        font-size: 2.2em;
    }
    header p {
        font-size: 1em;
    }

    /* Article padding and font size */
    article {
        padding: 1.5rem;
    }
    article.directory-view {
        padding: 1.5rem;
    }
    article h2 {
        font-size: 1.8em;
    }
    article h3 {
        font-size: 1.3em;
    }
    p {
        font-size: 1em;
    }

    /* Marquee adjustments */
    .hacker-marquee {
        font-size: 0.9em;
        height: 1.3em;
        padding: 0.3rem 0;
    }
    .hacker-marquee-content {
        line-height: 1.3em;
    }

    /* Directory Tree adjustments */
    .directory-tree {
        padding-left: 0.5rem; /* Reduce indentation */
    }
    .dir-item, .file-item {
        margin-bottom: 0.3rem;
        padding: 0.2rem 0;
    }
    .dir-toggle {
        font-size: 0.7em;
        margin-right: 0.3rem;
    }
    .dir-name, .file-name {
        font-size: 0.95em;
    }
    .file-icon {
        margin-right: 0.3rem;
    }
    .dir-content {
        margin-left: 1rem; /* Reduce nested indentation */
        padding-left: 0.3rem;
    }

    /* Group Details Panel adjustments */
    .group-details {
        padding: 1rem;
        margin-top: 2rem;
    }
    .group-details h3 {
        font-size: 1.4em;
    }
    .group-details p {
        font-size: 0.9em;
    }
    .group-details .call-to-action a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9em;
    }

    /* Call to Action button adjustments */
    .call-to-action a {
        padding: 0.8rem 1.5rem;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    header h1 {
        font-size: 1.8em;
    }
    header p {
        font-size: 0.9em;
    }
    article h2 {
        font-size: 1.5em;
    }
    article h3 {
        font-size: 1.1em;
    }
    p {
        font-size: 0.9em;
    }
    .hacker-marquee {
        font-size: 0.8em;
        height: 1.2em;
    }
    .hacker-marquee-content {
        line-height: 1.2em;
    }
    .dir-name, .file-name {
        font-size: 0.9em;
    }
    .group-details h3 {
        font-size: 1.2em;
    }
    .group-details p {
        font-size: 0.85em;
    }
}