@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&family=Outfit:wght@300;500;700&display=swap');

:root {
    /* Base Variables (Default/Obsidian Theme) */
    --bg-color: #0d0d0d;
    --bg-pure: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
    --accent-muted: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(25, 25, 25, 0.6);
    --success: #4cd964;
    --error: #ff3b30;
    --font-main: 'Inter', sans-serif;
    --bg-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

/* THEME: Cyberpunk (Neon Purple/Blue) */
[data-theme="cyber"] {
    --bg-color: #0b0014;
    --bg-pure: #05000a;
    --text-primary: #e0e0ff;
    --text-secondary: #b8a0d0;
    --accent: #d300ff;
    --accent-muted: rgba(211, 0, 255, 0.15);
    --border-color: rgba(211, 0, 255, 0.3);
    --card-bg: rgba(20, 0, 30, 0.7);
    --success: #00ff9d;
    --error: #ff0055;
    --font-main: 'Outfit', sans-serif;
    --bg-image: linear-gradient(0deg, transparent 24%, rgba(211, 0, 255, .05) 25%, rgba(211, 0, 255, .05) 26%, transparent 27%, transparent 74%, rgba(211, 0, 255, .05) 75%, rgba(211, 0, 255, .05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(211, 0, 255, .05) 25%, rgba(211, 0, 255, .05) 26%, transparent 27%, transparent 74%, rgba(211, 0, 255, .05) 75%, rgba(211, 0, 255, .05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
}

/* THEME: Ocean (Deep Blue) */
[data-theme="ocean"] {
    --bg-color: #001219;
    --bg-pure: #00080a;
    --text-primary: #e0faff;
    --text-secondary: #94b8c0;
    --accent: #00d2ff;
    --accent-muted: rgba(0, 210, 255, 0.15);
    --border-color: rgba(0, 210, 255, 0.2);
    --card-bg: rgba(0, 30, 40, 0.6);
    --success: #00ffc8;
    --error: #ff4d4d;
    --font-main: 'Inter', sans-serif;
    --bg-image: radial-gradient(circle at top right, rgba(0, 210, 255, 0.1), transparent 60%), radial-gradient(circle at bottom left, rgba(0, 60, 255, 0.1), transparent 60%);
}

/* THEME: Forest (Nature Green) */
[data-theme="forest"] {
    --bg-color: #0c120c;
    --bg-pure: #050a05;
    --text-primary: #e8f5e9;
    --text-secondary: #a5d6a7;
    --accent: #4caf50;
    --accent-muted: rgba(76, 175, 80, 0.15);
    --border-color: rgba(76, 175, 80, 0.25);
    --card-bg: rgba(20, 35, 20, 0.7);
    --success: #81c784;
    --error: #e57373;
    --font-main: 'Inter', sans-serif;
    --bg-image: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 25%, transparent 25%) -50px 0, linear-gradient(225deg, rgba(76, 175, 80, 0.05) 25%, transparent 25%) -50px 0, linear-gradient(315deg, rgba(76, 175, 80, 0.05) 25%, transparent 25%), linear-gradient(45deg, rgba(76, 175, 80, 0.05) 25%, transparent 25%);
    background-size: 100px 100px;
}

/* THEME: Sunset (Retro Orange/Red) */
[data-theme="sunset"] {
    --bg-color: #2b1100;
    --bg-pure: #1a0800;
    --text-primary: #ffecd1;
    --text-secondary: #ffb480;
    --accent: #ff6b35;
    --accent-muted: rgba(255, 107, 53, 0.15);
    --border-color: rgba(255, 107, 53, 0.3);
    --card-bg: rgba(50, 20, 0, 0.6);
    --success: #00b359;
    --error: #ff002b;
    --font-main: 'Outfit', sans-serif;
    --bg-image: linear-gradient(to bottom, #2b1100 0%, #1a0800 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-image);
    background-attachment: fixed;
    /* Parallax feel */
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    min-height: 100vh;
}

/* User Profile Header UI */
.user-menu-area {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    padding: 10px 20px;
    background: var(--bg-pure);
    border: 1px solid var(--border-color);
    border-radius: 30px;
}

.user-name-display {
    font-weight: 600;
    color: var(--accent);
}

.logout-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    cursor: pointer;
    border-left: 1px solid var(--border-color);
    padding-left: 15px;
}

.logout-link:hover {
    color: var(--error);
}

/* TOAST NOTIFICATION STYLES */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-pure);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 12px;
    border-left: 5px solid var(--accent);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight 0.4s ease forwards;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    /* Subtle border for glass look */
}

.toast-msg {
    flex-grow: 1;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.closing {
    opacity: 0;
    transform: translateX(50px);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- REUSED EXISTING STYLES BELOW --- */

/* Header */
.global-header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle,
.home-btn {
    background: var(--bg-pure);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.theme-toggle:hover,
.home-btn:hover {
    transform: scale(1.1);
    color: var(--accent);
    border-color: var(--accent);
}

/* Layout & Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 80px 15px 30px;
    }

    h1 {
        font-size: 2rem !important;
    }

    .global-header {
        top: 10px;
        right: 10px;
        gap: 10px;
    }

    .theme-toggle,
    .home-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .glass-card {
        padding: 20px;
        border-radius: 16px;
    }

    .tool-card {
        padding: 25px 15px;
    }

    .tool-card i {
        font-size: 1.8rem;
    }

    .tool-card h3 {
        font-size: 1rem;
    }

    .tool-card p {
        font-size: 0.85rem;
    }

    .toast {
        min-width: 250px;
        padding: 12px 20px;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

/* Tool Card */
.tool-card {
    background: var(--bg-pure);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    gap: 15px;
    height: 100%;
}

.tool-card i {
    font-size: 2.2rem;
    color: var(--accent);
    transition: all 0.4s;
    margin: 0;
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Hover Effect */
.tool-card:hover {
    background: var(--accent);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.tool-card:hover i {
    color: #000;
    transform: scale(1.1);
}

.tool-card:hover h3,
.tool-card:hover p {
    color: #000;
}

/* Animations - DISABLED HIDDEN START FOR SAFETY */
.animate-on-scroll {
    opacity: 1;
    /* Forcing visible */
    transform: none;
    /* No shift */
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

/* Input Controls Generic */
.input-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-control:focus {
    border-color: var(--accent);
    background: var(--accent-muted);
}