/* ==================================================
   myfitegre.com | GLOBAL SYSTEM STYLESHEET
   SYS_VERSION: 3.0.0 (Unified Master)
================================================== */

:root {
    /* Core System Dark Colors */
    --bg-dark: #050505;
    --matrix-green: #00FF41;
    --matrix-dim: #008F11;
    --matrix-dark: #003B00;
    --text-muted: rgba(0, 255, 65, 0.7);
    
    /* 3D & Structural Variables */
    --border-radius: 15px;
    --box-shadow-3d: 6px 6px 0px var(--matrix-dim);
    --tile-border: 2px dashed var(--matrix-green);
    --hero-glow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* ==================================================
   CYBER-LIGHT OVERRIDES (Google/Cyberpunk Theme)
================================================== */
.light-mode {
    --bg-dark: #F8F9FA; 
    --matrix-green: #EA4335; 
    --matrix-dim: #4285F4; 
    --matrix-dark: #FBBC05; 
    --text-muted: #34A853; 
    --box-shadow-3d: 8px 8px 0px #202124;
    --tile-border: 3px solid #202124;
    --hero-glow: 0 0 20px rgba(66, 133, 244, 0.4);
}

.light-mode body { color: #202124; text-shadow: none; }
.light-mode .tile { background-color: #ffffff; color: #202124; }
.light-mode nav a { color: #202124; font-weight: bold; }
.light-mode nav a:hover, .light-mode nav a.active { color: var(--matrix-dim); text-shadow: none; }

/* ==================================================
   BASE ELEMENTS
================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--matrix-green);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-shadow: 0 0 2px var(--matrix-dim);
    transition: background-color 0.4s, color 0.4s;
}

main { flex: 1; }
.page-title { font-size: 1.6rem; margin-bottom: 25px; border-left: 6px solid var(--matrix-green); padding-left: 15px; }

/* ==================================================
   HEADER, NAV & THEME TOGGLE
================================================== */
header { border-bottom: 2px solid var(--matrix-green); padding-bottom: 15px; margin-bottom: 30px; }
.logo { font-size: 2.2rem; font-weight: bold; letter-spacing: 4px; text-shadow: var(--hero-glow); }
nav ul { list-style: none; display: flex; gap: 15px; flex-wrap: wrap; }
nav a { color: var(--matrix-green); text-decoration: none; font-size: 1rem; transition: all 0.2s ease-in-out; }
nav a:hover, nav a.active { text-shadow: 0 0 8px var(--matrix-green); font-weight: bold; transform: scale(1.05); }
nav a::before { content: "[ "; opacity: 0.5; } nav a::after { content: " ]"; opacity: 0.5; }

.theme-btn {
    background: transparent;
    border: 2px solid var(--matrix-green);
    color: var(--matrix-green);
    padding: 8px 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    border-radius: var(--border-radius);
    box-shadow: 3px 3px 0px var(--matrix-dark);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.theme-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0px var(--matrix-green); background: var(--matrix-dark); color: #fff;}
.light-mode .theme-btn { border-color: var(--matrix-dim); color: var(--matrix-dim); box-shadow: 3px 3px 0px #202124; }
.light-mode .theme-btn:hover { background: var(--matrix-dim); color: #fff; box-shadow: 5px 5px 0px #202124;}

/* ==================================================
   STANDARD GRID & TILES (For Subpages)
================================================== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }

.tile {
    display: block;
    background-color: rgba(0, 0, 0, 0.4);
    border: var(--tile-border);
    border-radius: var(--border-radius);
    padding: 25px;
    text-decoration: none;
    color: var(--matrix-green);
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow-3d);
}
.tile:hover { border-style: solid; transform: translate(-4px, -4px); box-shadow: 10px 10px 0px var(--matrix-green); }
.light-mode .tile:hover { box-shadow: 10px 10px 0px var(--matrix-dim); }
.tile h2 { font-size: 1.4rem; margin-bottom: 12px; border-bottom: 1px solid var(--matrix-dark); padding-bottom: 5px; }
.tile p { font-size: 1rem; color: var(--text-muted); }

/* ==================================================
   THE MASTER RECTANGLE (For index.php)
================================================== */
.master-rectangle {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    border: 4px solid var(--matrix-dark);
    border-radius: 15px;
    background: rgba(0, 20, 0, 0.4);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1), inset 0 0 20px rgba(0,0,0,0.8);
}
@media(min-width: 900px) {
    .master-rectangle {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: minmax(350px, auto) minmax(350px, auto);
    }
}

.quadrant {
    border: 2px dashed var(--matrix-dim);
    border-radius: 10px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 15px rgba(0, 255, 65, 0.05);
    overflow: hidden;
}
.quadrant h2 { color: var(--matrix-green); border-bottom: 2px solid var(--matrix-dark); padding-bottom: 5px; margin-bottom: 15px; }
.flex-center { align-items: center; justify-content: center; }
.flex-bottom { justify-content: flex-end; }
.master-rectangle a { text-decoration: none; color: inherit; }

/* Quadrant 1 */
.intro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-col { border: 1px solid var(--matrix-dim); padding: 10px; text-align: center; background: rgba(0,255,65,0.1); border-radius: 5px; }

/* Quadrant 2: Rotating Elf */
.hero-image-wrapper { perspective: 1000px; }
.rotating-elf {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20%;
    border: 6px double var(--matrix-green);
    box-shadow: 0 0 30px var(--matrix-green), inset 0 0 15px #000;
    animation: 3dRotate 10s infinite linear;
    background: var(--matrix-dark);
}
@keyframes 3dRotate {
    0% { transform: rotateY(0deg) rotateZ(0deg); }
    50% { transform: rotateY(180deg) rotateZ(5deg); box-shadow: 0 0 50px var(--matrix-dim); border-color: var(--matrix-dim); }
    100% { transform: rotateY(360deg) rotateZ(0deg); }
}

/* Quadrant 3: Directory */
.directory-rows { display: flex; flex-direction: column; gap: 10px; }
.dir-row { border: 1px solid var(--matrix-dim); padding: 12px; border-left: 4px solid var(--matrix-green); background: rgba(0,0,0,0.5); transition: 0.2s; }
.dir-row:hover { transform: translateX(5px); background: rgba(0,255,65,0.15); border-color: var(--matrix-green); }
.dir-row h3 { color: var(--matrix-green); font-size: 1.1rem; }
.dir-row p { font-size: 0.85rem; color: var(--text-muted); }

/* Quadrant 4: Chart */
.stats-columns { display: flex; align-items: flex-end; gap: 15px; height: 180px; border-bottom: 2px solid var(--matrix-green); border-left: 2px solid var(--matrix-green); padding: 10px; }
.stat-col { flex: 1; background: var(--matrix-dim); position: relative; border-radius: 4px 4px 0 0; transition: 0.3s; box-shadow: 0 0 10px var(--matrix-dim); }
.stat-col:hover { background: var(--matrix-green); box-shadow: 0 0 20px var(--matrix-green); }
.stat-col::before { content: attr(data-val); position: absolute; top: -25px; left: 50%; transform: translateX(-50%); font-weight: bold; color: var(--matrix-green); }
.stat-col span { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--text-muted); }

/* Animated Toggle Icon */
.spin-icon { display: inline-block; animation: pulseIcon 2s infinite; margin-right: 8px; font-size: 1.1rem; }
@keyframes pulseIcon { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }

/* Quadrant Light Mode Overrides */
.light-mode .master-rectangle { background: #fff; border-color: #202124; box-shadow: 15px 15px 0px #202124; }
.light-mode .quadrant { background: #F8F9FA; border-color: #202124; box-shadow: 5px 5px 0 #4285F4; }
.light-mode .rotating-elf { border-color: #EA4335; box-shadow: 0 0 30px rgba(234, 67, 53, 0.5); background: #FBBC05; }
.light-mode .stat-col { background: #4285F4; box-shadow: none; }
.light-mode .stat-col:hover { background: #34A853; }
.light-mode .dir-row { background: #fff; border-color: #202124; }

/* ==================================================
   FOOTER
================================================== */
footer { margin-top: 60px; border-top: 3px dashed var(--matrix-dark); padding-top: 25px; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.social-links a { color: var(--text-muted); text-decoration: none; font-weight: bold; }
.social-links a:hover { color: var(--matrix-green); }

/* ==================================================
   BRAND TYPOGRAPHY (GOTHIC & MATRIX)
================================================== */
.brand-gothic {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; /* Sharp Gothic Vibe */
    font-weight: 900;
    text-transform: uppercase;
    color: var(--matrix-green);
    transition: all 0.3s ease;
}

/* Light Mode Overrides for the Brand Text */
.light-mode .brand-gothic {
    color: #00FF41 !important; /* Force maximum Matrix Green */
    -webkit-text-stroke: 1px #ffffff; /* White text border */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Hard shadow for depth */
    background: rgba(0, 0, 0, 0.05); /* Slight dark background to create the inset base */
    padding: 2px 10px;
    border-radius: 4px;
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.4); /* The requested inset effect */
}