/*
    =================================================================
    DEDSEC PROJECT MULTI-PAGE STYLES
    VERSION: 2.6 (Final Text Glow Compatibility Fix)
    =================================================================
*/

:root {
    /* MODIFIED: Digital Lavender Palette */
    --nm-abyss-blue: #01040a; 
    --nm-darkest: #0B121C;    
    --nm-dark: #151E2A;       
    --nm-container: #1F2A38;  
    --nm-border: #3A4A5E;      
    --nm-accent: #9966FF;      /* Digital Lavender */
    --nm-accent-hover: #9933FF; 
    --nm-text: #FFFFFF;        
    --nm-text-muted: #CCCCCC;  
    --nm-danger: #FF0000;      
    --nm-danger-hover: #FF0000; 
    --nm-success: #00FF00;     
    --nm-warning: #FFFF00;     
    
    --nm-text-on-accent: #FFFFFF;  
    --nm-text-on-status: #0B121C;  
    
    --glow-rgb: 153, 102, 255;
    --glow-color: rgba(var(--glow-rgb), 0.0); 
    --nm-search-green: var(--nm-accent); 
    --glow-color-search: rgba(var(--glow-rgb), 0.0); 
    --glow-color-danger: rgba(255, 0, 0, 0.0); 
    --glow-color-warning: rgba(255, 255, 0, 0.8); 

    --warning-bg: rgba(255, 255, 0, 0.1);
    --danger-bg: rgba(255, 0, 0, 0.1);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 10px);
    --shape-cut: 20px;
    --clip-path-shape: none; 
    
    /* ADDED: Premium feel variables */
    --ease-out-cubic: cubic-bezier(0.23, 1, 0.32, 1);
    --shadow-glow-accent: 0 0 15px 0px rgba(var(--glow-rgb), 0.5);
    --shadow-glow-success: 0 0 15px 0px rgba(0, 255, 0, 0.5);
    --shadow-glow-danger: 0 0 15px 0px rgba(255, 0, 0, 0.5);
    
    /* ADDED: Light theme specific variables */
    --nm-text-muted-dark: #CCCCCC;
    --nm-text-muted-light: #666666;
    --nm-border-light: #dddddd;
    --nm-container-light: #f8f8f8;
    --nm-darkest-light: #f0f0f0;
    --nm-dark-light: #e9e9e9;
}

body.light-theme {
    --nm-abyss-blue: #ffffff;
    --nm-darkest: var(--nm-darkest-light);
    --nm-dark: var(--nm-dark-light);
    --nm-container: var(--nm-container-light);
    --nm-border: var(--nm-border-light);
    --nm-text: #000000;
    --nm-text-muted: var(--nm-text-muted-light);
    --nm-warning: #9966FF;
    --glow-color: rgba(var(--glow-rgb), 0.3);
    --nm-search-green: var(--nm-accent);
    --nm-text-on-accent: #ffffff;
    
    /* FIXED: Ensure proper contrast for light theme */
    --warning-bg: rgba(153, 102, 255, 0.1);
    --danger-bg: rgba(255, 0, 0, 0.1);
}

/*
    =================================================================
    GLOBAL STYLES & PREMIUM UX
    =================================================================
*/

/* ADDED: Smooth scrolling and native-like touch behavior */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent; /* Disable tap flash on mobile */
    overscroll-behavior-y: none; /* Disable "bounce" on mobile */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--nm-abyss-blue);
    font-family: 'Inter', sans-serif; /* <-- OPTIMIZED: Changed for readability */
    color: var(--nm-text);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- OPTIMIZED: Keep specific elements monospaced --- */
.code-container code,
.nav-action-btn,
.form-group input,
#main-search-input,
.contact-grid .app-icon,
.copy-btn,
#useful-information-nav .app-icon { /* Added useful info buttons */
    font-family: 'Roboto Mono', monospace;
}
/* --- End optimization --- */

/* ADDED: Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--nm-dark); }
::-webkit-scrollbar-thumb { background: var(--nm-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nm-accent); }

/* --- BACKGROUND IMAGE STYLES --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://raw.githubusercontent.com/dedsec1121fk/dedsec1121fk.github.io/5860edb8a7468d955336c9cf1d8b357597d6d645/Assets/Images/Logos/Custom%20Black%20Purple%20Fox%20Logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -2;
    pointer-events: none;
    transition: background-image 0.3s ease;
    transform: translateZ(0);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3E/ffilter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0);
}

body.light-theme::before {
    background-image: url('https://raw.githubusercontent.com/dedsec1121fk/dedsec1121fk.github.io/6f776cd9772a079a6d26370dddab911bf7cde8cd/Assets/Images/Logos/Custom%20White%20Purple%20Fox%20Logo.jpg');
    opacity: 0.1; /* Reduced opacity for better readability */
}

/* ADDED: Page load fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- NAVIGATION STYLES --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nm-darkest);
    border-bottom: 2px solid var(--nm-accent);
    z-index: 1000;
    padding: 0 15px;
    box-sizing: border-box;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
    transition: max-width 0.3s ease;
}

/* MODIFIED: ADDED TEXT SAFETY */
.nav-title {
    flex-grow: 0; 
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-title h1 {
    margin: 0;
    font-size: 2rem; 
    color: var(--nm-accent);
    font-family: 'Orbitron', sans-serif;
    /* MODIFIED: Drastically simplified text-shadow to a single, minimal glow layer */
    text-shadow: 0 0 8px var(--nm-accent-hover);
    display: flex;
    align-items: center;
    gap: 10px;
    /* ADDED: Prevent text going out */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* ADDED: Fix for flex container truncation */
}

/* ADDED: Explicit light-theme fix for nav-title h1 to remove black outlines and keep single glow */
body.light-theme .nav-title h1 {
    /* Ensure the single, minimal glow is used here as well, overriding any potential inheritance of outlines */
    text-shadow: 0 0 8px var(--nm-accent-hover);
}

.nav-title h1::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    background-image: url('https://raw.githubusercontent.com/dedsec1121fk/dedsec1121fk.github.io/9254ed6bf953c497074005b0da02e819aba18487/Assets/Images/Logos/Custom%20Black%20Purple%20Fox%20Logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    text-shadow: none; 
}

body.light-theme .nav-title h1::after {
    background-image: url('https://raw.githubusercontent.com/dedsec1121fk/dedsec1121fk.github.io/6f776cd9772a079a6d26370dddab911bf7cde8cd/Assets/Images/Logos/Custom%20White%20Purple%20Fox%20Logo.jpg');
}

/* MODIFIED: BURGER MENU IS NOW VISIBLE GLOBALLY */
.burger-menu {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 4px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--nm-text);
    transition: all 0.3s var(--ease-out-cubic);
}

.burger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* MODIFIED: NAV MENU IS NOW ALWAYS THE MOBILE/SIDEBAR MENU */
.nav-menu {
    position: fixed;
    top: 70px; /* Aligns below the fixed header */
    right: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: var(--nm-darkest);
    flex-direction: column;
    padding: 20px;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s var(--ease-out-cubic);
    overflow-y: auto;
    /* Added display flex to ensure vertical alignment from original mobile styles */
    display: flex; 
    align-items: center; 
    gap: 20px;
}

.nav-menu.active { 
    transform: translateX(0); 
}

.nav-link {
    color: var(--nm-text);
    text-decoration: none;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid transparent;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
    /* ADDED: Full width for menu item look */
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: var(--nm-accent);
    color: var(--nm-text-on-accent); 
    border-color: var(--nm-accent-hover);
    /* MODIFIED: More lift and glow */
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}

/* ADDED: Premium "press" effect */
.nav-link:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/* MODIFIED: NAV ACTIONS STYLES FOR VERTICAL MENU */
.nav-actions {
    display: flex;
    gap: 10px;
    margin-left: 0; /* Removed desktop margin */
    margin-top: 20px; /* Added spacing in vertical menu */
    justify-content: center;
    flex-direction: column; /* Stack buttons vertically */
    width: 100%; /* Make actions take full width of menu */
}

.nav-action-btn {
    background: var(--nm-container);
    border: 1px solid var(--nm-border);
    color: var(--nm-text);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
    /* ADDED: Full width for menu item look */
    width: 100%; 
    justify-content: center;
    box-sizing: border-box;
}

.nav-action-btn:hover {
    background: var(--nm-accent);
    color: var(--nm-text-on-accent); 
    /* MODIFIED: More lift and glow */
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}

/* ADDED: Premium "press" effect */
.nav-action-btn:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/* --- PAGE CONTENT STYLES --- */
.page-content {
    margin-top: 80px;
    padding: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    transition: max-width 0.3s ease;
    /* ADDED: Page load animation */
    animation: fadeIn 0.5s 0.1s var(--ease-out-cubic) backwards;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--nm-accent);
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    /* MODIFIED: Drastically simplified text-shadow to a single, minimal glow layer */
    text-shadow: 0 0 8px var(--nm-accent-hover);
}

body.light-theme .page-header h1 {
    /* MODIFIED: Drastically simplified text-shadow to a single, minimal glow layer */
    text-shadow: 0 0 8px var(--nm-accent-hover);
}

.page-header p {
    color: var(--nm-text);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.content-section {
    background: rgba(31, 42, 56, 0.9);
    border: 1px solid var(--nm-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* MODIFIED: Premium transition */
    transition: border-color 0.3s ease, box-shadow 0.3s var(--ease-out-cubic);
}

body.light-theme .content-section {
    background: rgba(248, 248, 248, 0.9);
}

.content-section:hover {
    border-color: var(--nm-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), var(--shadow-glow-accent);
}

.content-section h2 {
    color: var(--nm-accent);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--nm-border);
    padding-bottom: 10px;
}

.content-section h3 {
    color: var(--nm-text);
    font-family: 'Orbitron', sans-serif;
    margin: 25px 0 15px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tool-card {
    background: rgba(11, 18, 28, 0.9);
    border: 1px solid var(--nm-border);
    border-radius: 15px;
    padding: 20px;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), border-color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic);
    will-change: transform, box-shadow;
}

body.light-theme .tool-card {
    background: rgba(240, 240, 240, 0.9);
}

.tool-card:hover {
    border-color: var(--nm-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}

.tool-card h4 {
    color: var(--nm-accent);
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}

/* --- TOOL FEATURES BULLET STYLES --- */
.tool-features ul { padding-left: 20px; margin: 0; }
.tool-features li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--nm-text);
    position: relative;
    padding-left: 5px;
}
.tool-features li::before {
    content: "•";
    color: var(--nm-accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --- HOMEPAGE SPECIFIC STYLES --- */
.phone-container {
    width: 100%;
    height: calc(100vh - 80px);
    background: transparent;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin-top: 80px;
}

.screen {
    width: 100%;
    height: 100%;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
    z-index: 0;
}

.home-screen {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 0 15px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* ADDED: Page load animation */
    animation: fadeIn 0.5s 0.1s var(--ease-out-cubic) backwards;
}

/* Certificate Form Styles */
.certificate-form-container { max-width: 500px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--nm-text);
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--nm-darkest);
    border: 2px solid var(--nm-border);
    color: var(--nm-text);
    border-radius: 20px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    box-sizing: border-box;
    /* MODIFIED: Premium transition */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s var(--ease-out-cubic);
}
.form-group input:focus {
    outline: none;
    border-color: var(--nm-accent);
    background-color: var(--nm-dark);
    box-shadow: var(--shadow-glow-accent);
}

.form-actions { text-align: center; margin-top: 30px; }

/* Search Styles */
.main-header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
    margin-bottom: 10px;
    padding: 25px 15px 0 15px;
    box-sizing: border-box;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 500px; 
    margin: 0 auto; 
}

.search-container::before,
.search-container::after {
    font-family: 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nm-text);
    z-index: 2;
    pointer-events: none;
}
.search-container::before { content: '\f002'; left: 20px; }
.search-container::after { content: '\f0ac'; right: 20px; }

#main-search-input {
    width: 100%;
    padding: 12px 45px;
    background-color: var(--nm-darkest);
    border: 2px solid var(--nm-search-green);
    color: var(--nm-text);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    clip-path: none; 
    border-radius: 50px; 
    box-sizing: border-box;
    /* MODIFIED: Premium transition */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s var(--ease-out-cubic);
}

#main-search-input:focus {
    outline: none;
    background-color: var(--nm-dark);
    border-color: var(--nm-accent-hover);
    box-shadow: var(--shadow-glow-accent);
}

#search-suggestions-container {
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    background-color: var(--nm-dark);
    border: 1px solid var(--nm-search-green);
    box-shadow: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    clip-path: none;
    border-radius: 20px;
}

#search-suggestions-container .search-result-item {
    padding: 12px 15px;
    color: var(--nm-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--nm-border);
}
#search-suggestions-container .search-result-item:last-child { border-bottom: none; }
#search-suggestions-container .search-result-item:hover {
    background-color: var(--nm-accent); 
    color: var(--nm-text-on-accent);
}

body.light-theme #search-suggestions-container .search-result-item {
    color: #000000;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 5px auto;
    padding: 10px;
    box-sizing: border-box;
}

.hero-text {
    color: var(--nm-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.7rem;
    color: var(--nm-text);
    margin-top: 25px;
}

/*
    =================================================================
    MODAL STYLES (COMMON)
    =================================================================
*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 8, 17, 0.8);
    /* --- OPTIMIZED: Removed performance-heavy blur --- */
    /* -webkit-backdrop-filter: blur(10px); */
    /* backdrop-filter: blur(10px); */
    /* --- End optimization --- */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    /* MODIFIED: Faster fade-in */
    transition: opacity 0.25s ease-out, visibility 0s 0.25s, backdrop-filter 0.25s ease-out;
}

body.light-theme .modal-overlay {
    background: rgba(255, 255, 255, 0.7);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease-out;
}

.modal-content {
    background: rgba(31, 42, 56, 0.9);
    width: 95%;
    max-width: 800px;
    height: 85%;
    max-height: 800px;
    border: 1px solid var(--nm-accent); 
    box-shadow: var(--shadow-glow-accent); /* ADDED: Modal glow */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    clip-path: none;
    border-radius: 20px;
    /* MODIFIED: Premium "grow-in" animation */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s var(--ease-out-cubic), opacity 0.3s ease;
    will-change: transform, opacity;
}

body.light-theme .modal-content {
    background: rgba(248, 248, 248, 0.9);
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--nm-border);
}

.modal-content-auto-height { height: auto; }

.modal-overlay.visible .modal-content {
    /* MODIFIED: Final state for "grow-in" */
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(11, 18, 28, 0.5);
    border-bottom: 1px solid var(--nm-border);
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

body.light-theme .modal-header {
    background: rgba(240, 240, 240, 0.5);
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin: 0;
    color: var(--nm-text);
    text-transform: uppercase;
    text-shadow: none; 
}

.close-modal {
    background: none;
    border: none;
    color: var(--nm-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    /* MODIFIED: Premium transition */
    transition: color 0.2s, text-shadow 0.2s, transform 0.2s var(--ease-out-cubic);
}

.close-modal:hover {
    color: var(--nm-danger);
    text-shadow: none; 
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.7;
    min-height: 0;
}

.modal-body-centered { 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Language Buttons */
.language-button {
    background-color: transparent;
    color: var(--nm-text);
    border: 1px solid var(--nm-accent);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    padding: 12px 25px;
    cursor: pointer;
    position: relative;
    clip-path: none;
    border-radius: 20px;
    box-shadow: none; 
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
}

.language-button:hover,
.language-button.selected {
    color: var(--nm-text-on-accent);
    background-color: var(--nm-accent);
    border-color: var(--nm-accent-hover);
    box-shadow: var(--shadow-glow-accent); 
    transform: translateY(-3px);
}

/* ADDED: Premium "press" effect */
.language-button:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/* Utility Classes */
.hidden { display: none !important; } 
.hidden-by-default { display: none; }

/* Accept/Decline Buttons */
.decline-btn, .accept-btn {
    color: var(--nm-text-on-status) !important;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), opacity 0.25s ease, box-shadow 0.25s var(--ease-out-cubic);
    will-change: transform, box-shadow;
}

.accept-btn {
    background-color: var(--nm-success) !important; 
    border-color: var(--nm-success);
}
.decline-btn {
    background-color: var(--nm-danger) !important; 
    border-color: var(--nm-danger);
}

.accept-btn:hover {
    opacity: 0.9;
    border-color: var(--nm-success) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-success) !important;
}
.decline-btn:hover {
    opacity: 0.9;
    border-color: var(--nm-danger) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-danger) !important;
}

/* ADDED: Premium "press" effect */
.accept-btn:active, .decline-btn:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/*
    =================================================================
    COMPONENT STYLES (CODE, NOTES, ETC)
    =================================================================
*/

/* Code Container */
.code-container {
    position: relative;
    background: rgba(11, 18, 28, 0.9);
    border: 1px solid var(--nm-border);
    padding: 15px;
    margin: 1em 0;
    transition: background-color 0.3s ease;
    clip-path: none;
    border-radius: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5); 
}

body.light-theme .code-container {
    background: rgba(240, 240, 240, 0.9);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.code-container code {
    font-family: 'Roboto Mono', monospace;
    color: var(--nm-text);
    word-break: break-all;
    display: block;
    font-size: 0.85em;
    background: none;
    padding: 0;
    border-radius: 0;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--nm-container);
    border: 1px solid var(--nm-border);
    color: var(--nm-text);
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    clip-path: none;
    border-radius: 20px;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
}

.copy-btn:hover {
    background: var(--nm-accent);
    color: var(--nm-text-on-accent);
    box-shadow: var(--shadow-glow-accent); 
    border-color: var(--nm-accent-hover);
    transform: translateY(-3px);
}

/* ADDED: Premium "press" effect */
.copy-btn:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/* Tip and Note Styles */
.tip, .note {
    background: rgba(31, 42, 56, 0.9);
    border-left: 2px solid var(--nm-warning);
    box-shadow: none; 
    margin: 1em 0;
    padding: 0.8em 1em;
    border-radius: 0 20px 20px 0;
    transition: all 0.3s ease;
}

body.light-theme .tip,
body.light-theme .note {
    background: rgba(248, 248, 248, 0.9);
}

.note.note-warning {
    background-color: var(--warning-bg);
    color: var(--nm-text);
    font-weight: bold;
    border-left: 4px solid var(--nm-warning);
    padding: 1rem;
    border-radius: 20px;
}
.note.note-danger {
    border-left: 4px solid var(--nm-danger);
    background: var(--danger-bg);
    padding: 1rem;
    border-radius: 20px;
}

/*
    =================================================================
    PAGE-SPECIFIC STYLES
    =================================================================
*/

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    justify-items: center;
    padding-top: 20px;
}

.contact-grid .app-icon {
    width: 100%;
    max-width: 350px;
    height: auto;
    padding: 12px 15px;
    gap: 15px;
    clip-path: none;
    border-radius: 20px; 
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--nm-accent);
    color: var(--nm-text);
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    box-sizing: border-box;
    position: relative;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
}

.contact-grid .app-icon:hover {
    background: var(--nm-accent);
    border-color: var(--nm-accent-hover);
    color: var(--nm-text-on-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}

/* ADDED: Premium "press" effect */
.contact-grid .app-icon:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

.contact-grid .app-icon i {
    color: var(--nm-text);
    transition: color 0.2s ease;
    font-size: 1.4rem;
    margin: 0;
    text-shadow: none; 
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.contact-grid .app-icon:hover i { color: var(--nm-text-on-accent); text-shadow: none; }
.contact-grid .app-icon span {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
    text-align: left;
}
body.light-theme .contact-grid .app-icon {
    background: var(--nm-darkest);
    color: var(--nm-text);
}

/* --- Gym Page --- */
.gym-carousel {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid var(--nm-border);
    background-color: rgba(31, 42, 56, 0.9);
    clip-path: none;
    border-radius: 20px;
}
body.light-theme .gym-carousel {
    background-color: rgba(248, 248, 248, 0.9);
}
.gym-clothing-images { width: 100%; height: 100%; }
.gym-clothing-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.gym-clothing-images img.active { opacity: 1; }
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    margin: 0 10px;
    transition: background-color 0.2s ease;
}
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-btn:hover { background-color: rgba(0, 0, 0, 0.8); }

/* --- About Page --- */
.github-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}
.github-stats img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--nm-border);
    background-color: rgba(31, 42, 56, 0.9);
    clip-path: none;
    border-radius: 20px; 
}
body.light-theme .github-stats img {
    background-color: rgba(248, 248, 248, 0.9);
}
.store-link { margin: 1rem 0 1.5rem 0; }
.store-link a {
    color: var(--nm-accent);
    font-weight: bold;
    text-decoration: none;
    border: 1px solid var(--nm-border);
    padding: 10px 15px;
    background-color: rgba(31, 42, 56, 0.9);
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
    clip-path: none;
    border-radius: 20px;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
}
body.light-theme .store-link a {
    background-color: rgba(248, 248, 248, 0.9);
}
.store-link a:hover {
    background-color: var(--nm-accent-hover);
    border-color: var(--nm-accent);
    color: var(--nm-darkest);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}
/* ADDED: Premium "press" effect */
.store-link a:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

/* --- Misc Components --- */
.modal-divider { margin: 2rem 0; border-color: var(--nm-border); }
.text-center { text-align: center; }
.ad-image {
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
    display: block;
    border-radius: 20px;
    border: 1px solid var(--nm-border);
}

/* --- Useful Information Page --- */
#useful-information-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#useful-information-nav .app-icon {
    width: 100%;
    height: auto;
    padding: 15px 20px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--nm-accent);
    color: var(--nm-text);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    text-decoration: none;
    box-sizing: border-box;
    /* MODIFIED: Premium transition */
    transition: transform 0.25s var(--ease-out-cubic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s var(--ease-out-cubic), border-color 0.25s ease;
    will-change: transform, box-shadow;
}

#useful-information-nav .app-icon:hover {
    background: var(--nm-accent);
    border-color: var(--nm-accent-hover);
    color: var(--nm-text-on-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-accent);
}

/* ADDED: Premium "press" effect */
#useful-information-nav .app-icon:active {
    transform: translateY(0px) scale(0.97);
    transition-duration: 0.1s;
}

#useful-information-nav .app-icon i { font-size: 1.4rem; color: inherit; flex-shrink: 0; }
#useful-information-nav .app-icon span {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
    word-break: break-word;
    line-height: 1.3;
    color: inherit;
}
body.light-theme #useful-information-nav .app-icon {
    background: var(--nm-darkest);
    color: var(--nm-text);
}

/* Progress Bar Styles */
.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: var(--nm-darkest);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    display: none;
    border: 1px solid var(--nm-border);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--nm-accent), var(--nm-accent-hover));
    transition: width 0.3s ease-in-out;
    border-radius: 20px;
}
.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Search Results Container */
#useful-info-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--nm-dark);
    border: 1px solid var(--nm-search-green);
    box-shadow: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    border-radius: 20px;
    margin-top: 5px;
}
#useful-info-results-container .search-result-item {
    padding: 12px 15px;
    color: var(--nm-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--nm-border);
    text-align: left;
}
#useful-info-results-container .search-result-item:last-child { border-bottom: none; }
#useful-info-results-container .search-result-item:hover {
    background-color: var(--nm-accent);
    color: var(--nm-text-on-accent);
}
#useful-info-results-container .search-result-item small {
    display: block;
    font-size: 0.7rem;
    color: var(--nm-text);
    margin-top: 4px;
}
#useful-info-results-container .search-result-item:hover small { color: rgba(0, 0, 0, 0.7); }

body.light-theme #useful-info-results-container .search-result-item {
    color: #000000;
}

/* Modal Search Container */
.modal-search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px auto;
}
.modal-search-container::before {
    font-family: 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    content: '\f002';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nm-text);
    z-index: 2;
}
.modal-search-container input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background-color: var(--nm-darkest);
    border: 2px solid var(--nm-search-green);
    color: var(--nm-text);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    border-radius: 50px;
    box-sizing: border-box;
    /* MODIFIED: Premium transition */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s var(--ease-out-cubic);
}
.modal-search-container input:focus {
    outline: none;
    background-color: var(--nm-dark);
    border-color: var(--nm-accent-hover);
    box-shadow: var(--shadow-glow-accent);
}

/* Content Highlight */
.content-highlight {
    background-color: rgba(255, 255, 0, 0.3);
    box-shadow: none;
    transition: background-color 1s ease;
    border-radius: 5px;
}

/* Cookie Consent Modal Specific Styles */
#cookie-consent-modal .modal-content { max-width: 500px; margin: 20px; }
#cookie-consent-modal .modal-body { max-height: 400px; overflow-y: auto; }
#cookie-consent-modal .modal-body ul { margin: 15px 0; padding-left: 20px; }
#cookie-consent-modal .modal-body li { margin-bottom: 8px; line-height: 1.4; }
#cookie-consent-modal .modal-body strong { color: var(--nm-accent); }
.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    border-top: 1px solid var(--nm-border);
    flex-shrink: 0;
}
#cookie-consent-modal { z-index: 2000; }
#language-selection-modal { z-index: 2001; }

/* Disclaimer Modal Buttons */
#disclaimer-modal .modal-footer { padding: 20px 20px; }
#disclaimer-modal .decline-btn,
#disclaimer-modal .accept-btn {
    font-size: 1rem;
    padding: 12px 20px;
    min-height: 40px;
    min-width: 90px;
    border-radius: 20px;
    margin: 0 10px;
}
#disclaimer-lang-btn { font-size: 1.1rem; padding: 12px 20px; }
#disclaimer-lang-btn i { font-size: 1.3rem; }

/*
    =================================================================
    RESPONSIVE DESIGN (ALL SCREENS)
    =================================================================
*/

/* --- Small Phones --- */
@media (max-width: 480px) {
    .page-header h1 { font-size: 2rem; }
    .nav-title h1 { font-size: 1.4rem; gap: 8px; }
    .nav-title h1::after { width: 1.8rem; height: 1.8rem; }
    .content-section { padding: 15px; }
    .modal-body { padding: 15px; }
}

/* --- Mobile & Small Tablets --- */
@media (max-width: 768px) {
    /* All navigation-related styles are handled globally now, only adjust layout */
    .phone-container { height: calc(100vh - 70px); margin-top: 70px; }
    .page-content { margin-top: 70px; padding: 15px; }
    .content-section { padding: 20px; }
    .content-grid { grid-template-columns: 1fr; }
    .nav-title h1 { font-size: 1.5rem; gap: 8px; }
    .nav-title h1::after { width: 2rem; height: 2rem; }
    #useful-information-nav { max-width: 100%; }
    #useful-information-nav .app-icon { padding: 12px 15px; }
    #useful-information-nav .app-icon span { font-size: 0.8rem; }
    #disclaimer-modal .modal-footer { flex-direction: column; gap: 15px; padding: 15px; }
    #disclaimer-modal .decline-btn,
    #disclaimer-modal .accept-btn {
        font-size: 0.9rem;
        padding: 10px 15px;
        min-height: 35px;
        min-width: 80px;
        margin: 0;
    }
    .modal-overlay {
        /* --- OPTIMIZED: Removed blur on mobile, using solid fallback --- */
        -webkit-backdrop-filter: none; 
        backdrop-filter: none; 
        background: rgba(1, 8, 17, 0.95);
    }
    body.light-theme .modal-overlay { background: rgba(255, 255, 255, 0.95); }
}

/* --- Tablets (Landscape) --- */
@media (min-width: 769px) and (max-width: 991px) {
    .content-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .page-header h1 { font-size: 2.2rem; }
}

/* MODIFIED: Centering logic for Desktops and larger screens */
@media (min-width: 992px) { 
    .nav-container {
        /* Align items to the right to ensure the burger menu is flush right */
        justify-content: flex-end; 
        position: relative; 
    }

    .nav-title {
        /* Absolute position and transform to center the title regardless of other elements */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 150px); /* Leave space for the burger menu and padding */
        text-align: center; /* Center the text within the title box */
    }
    
    .nav-title h1 {
        /* Ensure the H1 is centered inside its absolutely positioned container */
        justify-content: center;
    }

    .burger-menu {
        /* Ensure burger menu remains on the far right */
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .nav-container { padding: 15px 0; }
    .nav-title h1 { font-size: 2rem; }
}

/* --- Large Desktops & TVs --- */
@media (min-width: 1600px) {
    .nav-container, .page-content { max-width: 1500px; }
    body { font-size: 17px; }
    .page-header h1 { font-size: 3rem; }
    .content-section { padding: 40px; }
}

/*
    =================================================================
    ACCESSIBILITY (USER-FRIENDLY)
    =================================================================
*/

/* Add a visible focus ring that matches your theme */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.nav-action-btn:focus-visible,
.contact-grid .app-icon:focus-visible,
#useful-information-nav .app-icon:focus-visible {
    outline: 2px solid var(--nm-accent) !important;
    outline-offset: 2px;
    box-shadow: var(--shadow-glow-accent);
}

/* For inputs, we can just enhance the existing style */
#main-search-input:focus-visible,
.form-group input:focus-visible {
    outline: none;
}

/*
    =================================================================
    DESKTOP NAVIGATION (USER-FRIENDLY)
    =================================================================
*/

@media (min-width: 992px) {
    /* Hide the burger menu */
    .burger-menu {
        display: none;
    }

    /* Re-style the nav menu for desktop */
    .nav-menu {
        position: static;
        transform: none;
        height: auto;
        width: auto;
        max-width: none;
        flex-direction: row;
        background: none;
        box-shadow: none;
        padding: 0;
        overflow-y: visible;
        gap: 5px; /* Spacing between links */
        margin-left: auto; /* Pushes menu to the right */
    }

    /* This positions your nav menu to the right of the centered title,
       and the nav actions to the right of the nav menu.
    */
    .nav-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    
    .nav-title {
        /* This stays the same - centered */
        position: static;
        transform: none;
        grid-column: 2 / 3;
        text-align: center;
    }

    .nav-menu {
        grid-column: 3 / 4;
        justify-self: end;
        flex-direction: row;
        align-items: center;
    }
    
    .nav-link {
        width: auto; /* Let links be their natural width */
        font-size: 0.85rem;
    }
    
    /* Re-style the actions to be horizontal */
    .nav-actions {
        flex-direction: row;
        margin-top: 0;
        width: auto;
        margin-left: 15px; /* Space between links and actions */
        border-left: 1px solid var(--nm-border);
        padding-left: 15px;
    }
}