/* --- Rebrixe MASTER SYSTEM: NEON MODERN --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Outfit:wght@700;800&display=swap');

:root {
   --text: #f1f5f9;
    --white: #ffffff;
    --primary: #00f2ff; 
    --glow: rgba(0, 242, 255, 0.3);
    --bg: #0b0f1a;
    --card: #141a2a;
    --border: #1e293b;
    --glass: rgba(255, 255, 255, 0.03);
}

/* --- THEME DEFINITIONS --- */
[data-theme="growth"] { --primary: #ff007f; --glow: rgba(255, 0, 127, 0.3); --bg: #0d0208; --card: #1a0514; --border: #3d0a2b; --glass: rgba(255, 0, 127, 0.05); }
[data-theme="technical"] { --primary: #00f2ff; --glow: rgba(0, 242, 255, 0.3); --bg: #020b0d; --card: #05161a; --border: #0a2d3d; --glass: rgba(0, 242, 255, 0.05); }
[data-theme="generators"] { --primary: #6366f1; --glow: rgba(99, 102, 241, 0.3); --bg: #050510; --card: #0d0d1f; --border: #1a1a3d; --glass: rgba(99, 102, 241, 0.05); }
[data-theme="image-visual"] { --primary: #FFD600; --glow: rgba(252, 245, 46, 0.2);; --bg: #0d0c00;; --card: #1a1700; --border: #2a2500; --glass: rgba(252, 252, 46, 0.05); }
[data-theme="time-date"] { --primary: #94a3b8; --glow: rgba(123, 162, 164, 0.3); --bg: #02090f; --card: #061524; --border: #1e2d3d; --glass: rgba(148, 163, 184, 0.05); }

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; line-height: 1.6; transition: background 0.8s ease; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--primary-rgb, 0, 242, 255), 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--primary-rgb, 0, 242, 255), 0.028) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

:root                   { --primary-rgb: 0, 242, 255; }
[data-theme="growth"]   { --primary-rgb: 255, 0, 127; }
[data-theme="technical"]{ --primary-rgb: 0, 242, 255; }
[data-theme="generators"]{ --primary-rgb: 99, 102, 241; }
 

.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

/* --- TOOL CARD (COSMOS / NEON FUTURE) --- */
.tool-card {
    background: radial-gradient(900px 320px at 20% 0%, rgba(var(--primary-rgb), 0.18), transparent 58%),
                radial-gradient(700px 260px at 95% 15%, rgba(255, 0, 122, 0.10), transparent 62%),
                radial-gradient(800px 380px at 45% 120%, rgba(var(--primary-rgb), 0.10), transparent 58%),
                linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.10);
    padding: 60px 40px;
    border-radius: 32px;
    text-align: center;
    margin-bottom: 80px;
    box-shadow:
        0 25px 60px -18px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(var(--primary-rgb), 0.07) inset;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}

/* Space cosmos layer (vibe closer to index.html: nebula + orbit lines) */
.tool-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background:
        /* nebula glow */
        radial-gradient(900px 420px at 25% 0%, rgba(var(--primary-rgb), 0.18), transparent 55%),
        radial-gradient(760px 420px at 95% 15%, rgba(255, 0, 122, 0.12), transparent 58%),
        radial-gradient(900px 620px at 45% 120%, rgba(var(--primary-rgb), 0.10), transparent 60%),

        /* soft dust */
        radial-gradient(circle at 10% 30%, rgba(255,255,255,0.11) 0 1px, transparent 2px),
        radial-gradient(circle at 45% 25%, rgba(255,255,255,0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 35%, rgba(var(--primary-rgb),0.14) 0 1px, transparent 2px),
        radial-gradient(circle at 25% 75%, rgba(var(--primary-rgb),0.12) 0 1px, transparent 2px),
        radial-gradient(circle at 85% 70%, rgba(255,0,122,0.10) 0 1px, transparent 2px),

        /* orbit rings */
        radial-gradient(closest-side at 50% 35%, rgba(var(--primary-rgb), 0.00) 62%, rgba(var(--primary-rgb), 0.22) 66%, rgba(var(--primary-rgb), 0.00) 72%),
        radial-gradient(closest-side at 55% 48%, rgba(255,0,122,0.00) 60%, rgba(255,0,122, 0.18) 66%, rgba(255,0,122, 0.00) 73%),
        radial-gradient(closest-side at 48% 55%, rgba(var(--primary-rgb), 0.00) 57%, rgba(var(--primary-rgb), 0.16) 62%, rgba(var(--primary-rgb), 0.00) 70%),

        /* scanlines */
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.05),
            rgba(255,255,255,0.05) 1px,
            transparent 2px,
            transparent 9px
        );

    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    filter: saturate(1.08);
}


/* Neon orbital glow */
.tool-card::after {
    content: '';
    position: absolute;
    inset: -40px;
    background:
        radial-gradient(closest-side at 50% 35%, rgba(var(--primary-rgb), 0.18), transparent 58%),
        radial-gradient(closest-side at 65% 60%, rgba(255,0,122,0.12), transparent 60%),
        conic-gradient(from 180deg, rgba(var(--primary-rgb), 0.00), rgba(var(--primary-rgb), 0.22), rgba(255,0,122,0.14), rgba(var(--primary-rgb), 0.00));
    opacity: 0.16;
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
    transform: translateZ(0);
}

/* Ensure content stays above cosmic layers */
.tool-card > * {
    position: relative;
    z-index: 1;
}


h1 { 
    font-family: 'Outfit'; font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 5px; letter-spacing: -2px; 
    background: linear-gradient(to right, #fff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}

/* --- INTERACTIVE ELEMENTS --- */
input, select, textarea { 
    width: 100%; max-width: 500px; background: #000; border: 1px solid var(--border); 
    padding: 18px; border-radius: 14px; color: white; font-size: 1.1rem; 
    outline: none; transition: 0.3s; text-align: center; box-sizing: border-box;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 15px var(--glow); }

.gen-btn { 
    /* Dark, sleek base */
    background: var(--primary); 
    color: var(--text); 
    /* A thin, subtle hint of the category color */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 18px; 
    border-radius: 16px; 
    font-weight: 800; 
    cursor: pointer; 
    font-size: 1rem; 
    width: 100%; 
    max-width: 500px; 
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* Smooth transition for multiple properties */
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.gen-btn:hover { 
    transform: translateY(-5px); 
    /* Ignites with category color */
    background: var(--primary); 
    color: #fff;
    border-color: var(--primary);
    
    /* High-end soft glow */
    box-shadow: 0 15px 40px -5px var(--glow); 
    filter: brightness(1.1);
}

/* Subtle "Click" feedback */
.gen-btn:active {
    transform: translateY(-2px);
    filter: brightness(0.9);
}

/* Optional: Add a very faint inner glow to the button text */
.gen-btn:hover {
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
/* --- RESULT SYSTEMS --- */
#result-list { margin-top: 50px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* GRID MODE (For boxes/names) */
/* --- THE EQUALIZER GRID --- */
#result-list.grid-mode {
    display: grid;
    /* This creates a responsive grid that adapts to screen size */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
    width: 100%;
    max-width: 1100px;
    margin: 50px auto;
    /* This tells all children to fill the full height of the row */
    align-items: stretch; 
}

.name-item { 
    background: var(--glass); 
    padding: 30px; 
    border-radius: 16px; 
    border: 1px solid var(--border); 
    font-family: 'Outfit'; 
    color: var(--primary);
    text-align: center; 
    cursor: pointer; 
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* THE FIX: These 3 lines force the box to expand to the grid's height */
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-sizing: border-box;
}

.name-item:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary); 
    background: rgba(255, 255, 255, 0.05); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* --- SEO CONTENT --- */
.seo-content { border-top: 1px solid var(--border); padding-top: 80px; text-align: left; }
.seo-content h2 { font-family: 'Outfit'; font-size: 2.2rem; color: var(--primary); margin-bottom: 20px; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin: 40px 0; }
.tip-card { background: var(--glass); padding: 25px; border-radius: 20px; border: 1px solid var(--border); }
.tip-card strong { color: var(--primary); display: block; margin-bottom: 10px; }
/* --- CLICKBAIT GRADER SPECIFIC --- */
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin: 30px auto 10px;
    background: var(--glass);
    box-shadow: 0 0 20px var(--glow);
    font-family: 'Outfit';
}

/* Ensure the results use our high-performance grid */
.grading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 40px;
    align-items: stretch; /* The Equalizer! */
}

/* Style for the "COPIED" hint */
.copy-hint {
    display: block;
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
/* --- GROWTH & PROGRESS SYSTEM --- */
.result-card { 
    background: var(--glass); 
    padding: 30px 25px; 
    border-radius: 20px; 
    border: 1px solid var(--border); 
    max-width: 500px; 
    margin: 0 auto; 
    text-align: center;
    animation: fadeIn 0.4s ease forwards;
}

.rate-val { 
    font-family: 'Outfit'; 
    font-size: 4rem; 
    font-weight: 800; 
    color: #fff; 
    margin: 0; 
    line-height: 1; 
}

.status-pill { 
    display: inline-block; 
    padding: 4px 12px; 
    border-radius: 6px; 
    font-weight: 900; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    margin-bottom: 15px; 
    color: #fff; 
    background: var(--primary);
}

.progress-container { 
    width: 100%; 
    height: 6px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 10px; 
    margin: 25px 0; 
    overflow: hidden; 
}

.progress-fill { 
    height: 100%; 
    background: var(--primary); 
    width: 0%; 
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1); 
    box-shadow: 0 0 10px var(--glow);
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
/* --- INPUT & TEXTAREA SYSTEM --- */
textarea { 
    width: 100%; max-width: 600px; height: 180px; background: #000; 
    border: 1px solid var(--border); padding: 20px; border-radius: 14px; 
    color: white; font-family: 'Inter'; font-size: 1rem; outline: none; 
    box-sizing: border-box; transition: 0.3s; resize: none;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 15px var(--glow); }

/* --- WINNER / SINGLE RESULT DISPLAY --- */
.winner-card { 
    background: var(--glass); padding: 40px 25px; border-radius: 20px; 
    border: 2px solid var(--primary); max-width: 500px; margin: 40px auto; 
    text-align: center; animation: fadeIn 0.4s ease forwards;
    box-shadow: 0 0 30px rgba(255, 0, 127, 0.1);
}

.winner-label { 
    font-size: 0.7rem; font-weight: 900; text-transform: uppercase; 
    letter-spacing: 2px; color: var(--primary); margin-bottom: 10px; display: block; 
}

.winner-name { 
    font-family: 'Outfit'; font-size: clamp(2rem, 8vw, 3.5rem); 
    font-weight: 800; color: #fff; margin: 0; line-height: 1.2; 
    word-wrap: break-word; 
}
/* --- GRID PREVIEWER SYSTEM --- */
.grid-preview-area {
    max-width: 450px; /* Slimmer for a more realistic phone feel */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: #000;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.grid-item {
    aspect-ratio: 1/1;
    background: #111;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:hover { background: #1a1a1a; filter: brightness(1.2); }

.grid-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    animation: scaleIn 0.3s ease; 
}

.grid-item .plus-icon { 
    font-size: 1.5rem; 
    color: var(--primary); 
    opacity: 0.3; 
    transition: 0.3s; 
}

.grid-item:hover .plus-icon { opacity: 1; transform: scale(1.2); }

/* Animation for the images appearing */
@keyframes scaleIn { 
    from { transform: scale(1.1); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

/* Control Panel for Grid */
.control-panel { 
    margin-top: 40px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 15px; 
}
.back-btn { 
    display: inline-flex; align-items: center; padding: 10px 20px; 
    background: var(--glass); border: 1px solid var(--border); 
    border-radius: 12px; color: var(--text); text-decoration: none; 
    font-size: 0.9rem; margin-bottom: 40px; transition: 0.3s; 
}
.back-btn:hover { 
    background: rgba(255,255,255,0.1); transform: translateX(-5px); 
    border-color: var(--primary); color: var(--primary);
}
/* GLOBAL WORKSPACE SYSTEM */
.workspace {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

.results-area {
    flex: 1.5; /* Takes up more space on Desktop */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-panel {
    flex: 1;
    position: sticky;
    top: 20px;
}

/* MOBILE RESPONSIVENESS (The "Phone Fix") */
@media (max-width: 900px) {
    .workspace {
        flex-direction: column; /* Stacks vertically on phones */
    }

    .control-panel {
        order: -1; /* CRITICAL: Moves the input/button to the TOP of the screen */
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }

    .results-area {
        width: 100%;
        order: 2; /* Results stay at the bottom */
    }
}
.container h1, .container .subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.name-item, .result-card, .winner-card {
    width: 100% !important; /* Forces all boxes to match the parent width */
    max-width: 500px;       /* Limits how wide they get on desktop */
    margin: 0 auto;         /* Double-insurance for centering */
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centers the TEXT inside the box */
    text-align: center;
    box-sizing: border-box;
    padding: 25px;
}

/* --- THE MODERN GRID SYSTEM --- */s

/* LAPTOP VIEW (The Default) */
#result-list.grid-mode, .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
}

/* MOBILE RE-POSITIONING ONLY */
@media (max-width: 600px) {
    
    /* 1. The Grid: Change from 1 column to 2 columns */
    #result-list.grid-mode, .grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* The 2-column layout */
        gap: 12px !important;
        padding: 15px !important;
        justify-items: center;
    }

    /* 2. The Cards: Keep the glow/colors, just resize for the grid */
    .tool-card, .name-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px 10px !important; 
        min-height: 160px; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }

    /* 3. The Text: Shrink slightly for mobile */
    .tool-card h3, .name-item h3 {
        font-size: 0.95rem !important;
        text-align: center;
        margin-bottom: 5px;
    }

    .tool-card p, .name-item p {
        font-size: 0.75rem !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 4. The Badge */
    .badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }
} /* <--- MAKE SURE THIS BRACKET IS HERE */
/* --- ENTRANCE ANIMATIONS --- */
@keyframes premiumReveal {
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.98); 
        filter: blur(5px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
        filter: blur(0);
    }
}

.name-item, .result-card, .winner-card {
    animation: premiumReveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* If there are multiple items, they should pop in one after another */
.name-item:nth-child(1) { animation-delay: 0.1s; }
.name-item:nth-child(2) { animation-delay: 0.15s; }
.name-item:nth-child(3) { animation-delay: 0.2s; }
.name-item:nth-child(4) { animation-delay: 0.25s; }
