@import url('./colors.css');

/* GLOBAL STYLES */
body {
    margin: 0;
    font-family: "Gowun Dodum", sans-serif;
    font-size: calc(13px + 0.390625vw);
    color: var(--text-primary);
    background-color: var(--background-dark);
    overflow: hidden;
}

h1, h2, h3 {
    color: var(--text-tertiary);
    font-family: "Poppins", sans-serif;
}

h1 {
    color: var(--text-secondary); /* Fancy color for the header */
    text-align: center; /* Center-align the header */
    font-size: 2.5rem; /* Increase the font size for prominence */
    text-transform: uppercase; /* Make the text uppercase */
    letter-spacing: 2px; /* Add some spacing between the letters */
    font-family: "Poppins", sans-serif; /* Keep the modern font */
    position: relative;
    z-index: 1; /* Ensure the text is above the shadows */
    text-shadow: 
        0 0 10px var(--text-highlight),  /* Glowing effect with the highlight color */
        0 0 20px var(--text-highlight),  /* Stronger glow */
        0 0 30px var(--link-hover-bg),   /* Add a second color glow */
        0 0 40px var(--link-hover-bg);   /* Add a third layer for more intensity */
    background-clip: text; /* Ensure the background clips to the text */
    -webkit-background-clip: text; /* Add for webkit browsers like Safari */
}

/* Adding a fancy text-shadow effect */
h1::before {
    content: attr(data-text); /* Ensure the shadow text matches the actual text */
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1; /* Place the shadow below the main text */
    color: var(--text-highlight); /* Set the shadow color to match your highlight color */
    background: var(--scrollbar-thumb); /* Apply the scrollbar-thumb color */
    background-image: linear-gradient(45deg, var(--text-highlight), var(--link-hover-bg)); /* Gradient for extra flair */
    padding: 2px; /* Add some space around the shadow */
    text-shadow: 
        3px 3px 10px rgba(0, 0, 0, 0.5), /* Darker shadow for depth */
        -3px -3px 5px rgba(0, 0, 0, 0.3), /* Lighter shadow for a softer look */
        5px 5px 15px rgba(0, 0, 0, 0.7); /* Stronger shadow for contrast */
    background-clip: text; /* Apply background-clip to the pseudo-element */
    -webkit-background-clip: text; /* Add for webkit browsers */
}

a {
    color: var(--link-color); /* Use the orange-red for default link color */
    text-decoration: none; /* Remove underline by default */
    text-shadow: 
        0 0 5px var(--link-color),   /* Subtle glow effect */
        0 0 10px var(--link-color); /* Slightly extended glow */
    transition: color 0.3s ease, text-shadow 0.3s ease; /* Smooth transition for hover effects */
}

a:hover, a:focus {
    color: var(--text-highlight); /* Orange-red for hover/focus state */
    text-shadow: 
        0 0 5px var(--text-highlight), /* Glow effect on hover */
        0 0 15px var(--text-highlight); /* Stronger glow for emphasis */
}

/* LAYOUT */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    gap: 1px;
    background-color: hsl(from var(--background-light) h s calc(l * 1.2));
    overflow: hidden;
}

/* HEADER & FOOTER */
.header, .footer {
    grid-column: 1 / -1;
    text-align: center;
    background-color: var(--header-footer-bg);
    color: var(--text-secondary);
}

.footer {
    padding: 0.5rem 0;
}

/* LEFT SIDEBAR */
.left-sidebar {
    grid-column: 1 / 3; /* Default position */
    background: var(--header-footer-bg);
    color: var(--text-highlight);
    position: relative;
    padding: 0.5rem;
    box-sizing: border-box;
}

.left-sidebar h2 {
    text-align: center;
}

.left-sidebar ul {
    list-style: none;
    padding: 0;
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: bold;
}

.left-sidebar ul li {
    width: 100%;
}

.left-sidebar ul li a,
.left-sidebar ul li.activeLink {
    display: block;
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    text-decoration: none;
}

.left-sidebar ul li a {
    color: var(--text-highlight);
    background-color: var(--header-footer-bg);
}

.left-sidebar ul li.activeLink {
    background-color: var(--text-highlight);
    color: var(--text-active);
}

.left-sidebar ul li a:hover,
.left-sidebar ul li a:active {
    background-color: var(--link-hover-bg);
    color: var(--text-active);
}

/* RIGHT SIDEBAR */
.right-sidebar {
    grid-column: 11 / 13; /* Default position */
    background: var(--header-footer-bg);
    color: var(--text-highlight);
    position: relative;
    padding: 0.5rem;
    box-sizing: border-box;
}

.right-sidebar h2 {
    text-align: center;
}

.right-sidebar ul {
    list-style: none;
    padding: 0;
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: bold;
}

.right-sidebar ul li {
    width: 100%;
}

.right-sidebar ul li a,
.right-sidebar ul li.activeLink {
    display: block;
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    text-decoration: none;
}

.right-sidebar ul li a {
    color: var(--text-highlight);
    background-color: var(--header-footer-bg);
}

.right-sidebar ul li.activeLink {
    background-color: var(--text-highlight);
    color: var(--text-active);
}

.right-sidebar ul li a:hover,
.right-sidebar ul li a:active {
    background-color: var(--link-hover-bg);
    color: var(--text-active);
}

/* MAIN CONTENT */
.main-content {
    grid-column: 3 / 11;
    display: flex;
    flex-direction: column;
    background-color: var(--background-dark);
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
}

.main-content p {
    margin: 0.2rem;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: var(--text-secondary);
}

.main-content::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    /* Enable scrolling for the entire page */
    html, body {
        overflow: auto;
        height: 100%;
    }

    .container {
        grid-template-rows: auto auto 1fr auto auto;
        overflow-y: auto;
    }

    .container::-webkit-scrollbar {
        width: 8px;
    }

    .container::-webkit-scrollbar-track {
        background: var(--text-secondary);
    }

    .container::-webkit-scrollbar-thumb {
        background-color: var(--scrollbar-thumb);
        border-radius: 4px;
    }

    .container::-webkit-scrollbar-thumb:hover {
        background-color: var(--scrollbar-thumb-hover);
    }

    .main-content {
        grid-column: 1 / -1;
        grid-row: 3;
        gap: 0;
        overflow: visible;
    }

    .left-sidebar {
        grid-column: 1 / 7;
        grid-row: 2;
    }

    .right-sidebar {
        grid-column: 7 / 13;
        grid-row: 2;
    }

    /* Ensure consistent padding and border between both sidebars */
    .left-sidebar,
    .right-sidebar {
        padding: 0.5rem;
        border-right: 1px solid var(--background-light); /* Divider between the sidebars */
    }

    .right-sidebar {
        border-left: 1px solid var(--background-light); /* Divider to the left of the right sidebar */
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .main-content {
        width: 100%;
    }
}
