/* style.css */

/* ================== CSS VARIABLES (THEME COLORS) ================== */
/* These variables now primarily control the main content area, not the header/footer */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    
    --light-bg: #f5f7fa;
    --light-card-bg: #ffffff;
    --light-text: #333333;
    --light-text-secondary: #666;
    --light-border: #eaeaea;
    --light-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);

    --dark-bg: #0b0c10;
    --dark-card-bg: #1f2833;
    --dark-text: #c5c6c7;
    --dark-text-secondary: #888;
    --dark-border: #333;
    --dark-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);

    --border-radius: 12px;
    --transition: all 0.3s ease-in-out;
}

/* ================== GENERAL BODY & LAYOUT ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

body.dark-mode a {
    color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-wrapper {
    margin-top: 30px;
}

.page-content {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    gap: 20px;
}

/* ================== HEADER / NAVBAR - UPDATED SECTION ================== */
header {
    /* UPDATED: Using the exact gradient from the original code */
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* REMOVED: No longer needs a border as the color is distinct */
    transition: var(--transition);
}
/* REMOVED: The body.dark-mode header rule is no longer needed */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    /* UPDATED: Color is now static white for the dark header */
    color: #ffffff;
}
/* REMOVED: body.dark-mode .logo a is no longer needed */

header nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

header nav ul li a {
    /* UPDATED: Using a soft white for readability */
    color: #e0e6f1;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 50px;
    transition: var(--transition);
}
/* REMOVED: body.dark-mode header nav ul li a is no longer needed */

header nav ul li a:hover, header nav ul li a.active {
    /* UPDATED: Hover effect for the new header style */
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
/* REMOVED: body.dark-mode hover rule is no longer needed */

.theme-toggle {
    background: none;
    border: none;
    /* UPDATED: Color is static white */
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(30deg);
}
/* REMOVED: Dark mode override is no longer needed */

.mobile-menu-btn {
    display: none;
}


/* ================== SIDEBARS / AD SPACES ================== */
.ad-container {
    background-color: var(--light-card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--light-shadow);
    transition: var(--transition);
    visibility: hidden;
}

body.dark-mode .ad-container {
    background-color: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
}

.ad-container h3 {
    margin-bottom: 15px;
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
    text-align: center;
}

.ad-placeholder {
    background: #f0f2f5;
    height: 600px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ccc;
}

body.dark-mode .ad-placeholder {
    background: #2a2a2a;
    color: #666;
}

/* ================== GRADIENT CARDS & SPHERE ================== */
.gradient-card {
    background-color: var(--light-card-bg);
    border-radius: 16px;
    box-shadow: var(--light-shadow);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: var(--transition);
}

body.dark-mode .gradient-card {
    background-color: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
}

.gradient-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

body.dark-mode .gradient-card:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--light-text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

body.dark-mode .card-header {
    color: var(--dark-text-secondary);
}

.card-header .gradient-name {
    color: var(--light-text);
    font-weight: 600;
    font-size: 16px;
}

body.dark-mode .card-header .gradient-name {
    color: var(--dark-text);
}

.gradient-sphere {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px auto;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

	

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'SF Mono', 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #aaa;
}

.copy-css-btn {
    background-color: #f0f2f5;
    border: none;
    color: var(--light-text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

body.dark-mode .copy-css-btn {
    background-color: #2a2a2a;
    color: var(--dark-text-secondary);
}

.copy-css-btn:hover {
    background-color: #e4e6e9;
    color: var(--light-text);
}

body.dark-mode .copy-css-btn:hover {
    background-color: #333;
    color: var(--dark-text);
}

/* ================== FULL-SCREEN MODAL ================== */
.modal-overlay, .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1010;
    display: none;
}
.modal-overlay { align-items: center; justify-content: center; }
.modal-content { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.close-btn { position: absolute; top: 30px; right: 45px; font-size: 50px; color: white; cursor: pointer; text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5); z-index: 1001; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: white; cursor: pointer; padding: 20px; z-index: 1001; text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5); }
.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }
.gradient-info { text-align: center; color: white; text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5); }
.gradient-info h2 { font-size: 3rem; font-weight: bold; margin-bottom: 25px; }
.code-box { margin-top: 20px; background: rgba(0, 0, 0, 0.2); padding: 20px 30px; border-radius: 12px; display: inline-block; border: 1px solid rgba(255, 255, 255, 0.2); font-family: 'SF Mono', 'Courier New', Courier, monospace; }
#modal-copy-btn { margin-left: 15px; background: white; border: none; color: black; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: transform 0.1s ease; }
#modal-copy-btn:active { transform: scale(0.95); }

/* ================== FOOTER - UPDATED SECTION ================== */
footer {
    /* UPDATED: Using the exact color from the original code */
    background-color: #1a1a2e;
    color: #ffffff; /* Explicitly setting text color */
    padding: 60px 0 20px;
    margin-top: 60px;
}
/* REMOVED: The body.dark-mode footer rule is no longer needed */

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about .logo {
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-about p {
    /* UPDATED: Using the exact color from the original code */
    color: #aaa;
    max-width: 350px;
    margin-bottom: 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    /* UPDATED: Using the exact color from the original code */
    color: #aaa;
}

.footer-section ul li a:hover {
    /* UPDATED: Using the exact hover color */
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    /* UPDATED: Using the exact background color from the original code */
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: #000;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
}

/* ================== MOBILE & RESPONSIVE ================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--light-card-bg);
    z-index: 1020;
    padding: 20px;
    transition: var(--transition);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

body.dark-mode .mobile-menu {
    background-color: var(--dark-card-bg);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay.active {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-border);
}

body.dark-mode .mobile-menu-header {
    border-bottom: 1px solid var(--dark-border);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--light-text-secondary);
    cursor: pointer;
}

body.dark-mode .mobile-menu-close {
    color: var(--dark-text-secondary);
}

.mobile-menu ul {
    list-style: none;
}
.mobile-menu ul li { margin-bottom: 15px; }
.mobile-menu ul li a { color: var(--light-text); font-size: 18px; font-weight: 500; display: block; padding: 10px 0; }
body.dark-mode .mobile-menu ul li a { color: var(--dark-text); }

@media (max-width: 1200px) {
    .page-content {
        grid-template-columns: 1fr 4fr;
    }
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .page-content {
        grid-template-columns: 1fr;
    }
    .left-sidebar {
        display: none;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        /* UPDATED: Color is static white */
        color: #ffffff;
        font-size: 24px;
        cursor: pointer;
    }
    /* REMOVED: Dark mode override no longer needed */
    .footer-links {
        grid-template-columns: 1fr;
    }
}