/* style.css - FINAL VERSION (SMALLER PREVIEW IMAGES) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&family=Nunito:wght@400;700&display=swap');

:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --primary-pink: #ff2e63;
    --primary-blue: #08d9d6;
    --accent-purple: #a64ac9;
    --text-white: #eaeaea;
    --text-gray: #b2b2b2;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    padding-top: 140px;
}

/* --- HEADER & NAV --- */
header {
    background: rgba(22, 33, 62, 0.95);
    padding: 15px 20px;
    border-bottom: 3px solid var(--accent-purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: padding 0.3s ease, background 0.3s ease;
}

header.shrink {
    padding: 2px 20px !important;
    background: rgba(22, 33, 62, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.site-domain {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-gray);
    letter-spacing: 1px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 46, 99, 0.5));
    transition: height 0.3s ease;
}

header.shrink .logo img {
    height: 35px !important;
}

.logo span {
    color: var(--primary-pink);
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 60px 20px 80px 20px;
    position: relative;
    background:
        linear-gradient(to bottom, rgba(26, 26, 46, 0.6), var(--bg-color)),
        url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-white);
    text-shadow: 0px 4px 10px rgba(0,0,0,0.8);
}

.hero p {
    color: #ddd;
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0px 2px 5px rgba(0,0,0,0.8);
    font-weight: 600;
}

/* --- LAYOUT & GRID --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-pink);
    box-shadow: 0 10px 20px rgba(255, 46, 99, 0.2);
}

.tool-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* --- GENERATOR BOX --- */
.generator-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    margin: 30px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-btn {
    background: transparent;
    border: 2px solid var(--text-gray);
    color: var(--text-gray);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.option-btn.active {
    border-color: var(--primary-blue);
    color: var(--bg-color);
    background: var(--primary-blue);
}

.gen-btn {
    background: linear-gradient(45deg, var(--primary-pink), var(--accent-purple));
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-heading);
    box-shadow: 0 5px 15px rgba(255, 46, 99, 0.4);
    transition: 0.2s;
    width: 100%;
    margin-bottom: 20px;
}

.gen-btn:active {
    transform: scale(0.98);
}

/* --- RESULTS AREA --- */
.result-area {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-blue);
    border: 1px solid rgba(255,255,255,0.05);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.9rem;
}

.copy-btn:hover {
    color: white;
}

/* --- TOAST NOTIFICATION --- */
#toast-notification {
    visibility: hidden;
    min-width: 250px;
    background: linear-gradient(45deg, #ff2e63, #a64ac9);
    color: white;
    text-align: center;
    border-radius: 50px;
    padding: 15px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast-notification.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* --- ADS CONTAINER --- */
.ad-space {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    min-height: 90px;
    overflow: hidden;
}

footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0,0,0,0.2);
    margin-top: 50px;
    color: var(--text-gray);
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .gen-btn { width: 100%; }
    header { flex-direction: column; gap: 10px; }
    body { padding-top: 160px; }
}

/* --- FEATURED TOOL (PULSING STYLE) --- */
@keyframes pulse-neon {
    0% {
        box-shadow: 0 0 0 0 rgba(8, 217, 214, 0.7);
        border-color: var(--primary-blue);
    }
    70% {
        box-shadow: 0 0 20px 20px rgba(8, 217, 214, 0);
        border-color: #fff;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(8, 217, 214, 0);
        border-color: var(--primary-blue);
    }
}

.featured-section {
    margin: 20px 0 40px 0;
    display: flex;
    justify-content: center;
}

.featured-tool-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 30px 40px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-white);
    border: 2px solid var(--primary-blue);
    animation: pulse-neon 2s infinite;
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.featured-tool-card:hover {
    transform: scale(1.02);
    background: #1f2b4d;
}

.featured-tool-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-tool-card p {
    font-size: 1.1rem;
    color: #ddd;
}

/* --- COMPARISON PREVIEW (Smaller Side-by-Side Images) --- */
.comparison-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Reduced gap slightly */
    margin-top: 25px;
    flex-wrap: nowrap; /* Forces them to stay in one row */
}

.comparison-img {
    width: 100px;  /* CHANGED: Made smaller (was 120px) */
    height: 100px; /* CHANGED: Made smaller (was 120px) */
    border-radius: 8px;
    border: 2px solid #333;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    background: #000;
}

.arrow-icon {
    font-size: 1.5rem; /* Slightly smaller arrow to match */
    color: var(--primary-blue);
    animation: bounce-right 1s infinite alternate;
}

@keyframes bounce-right {
    from { transform: translateX(0); }
    to { transform: translateX(5px); }
}

/* --- LOADING SPINNER --- */
.loader {
    border: 5px solid #16213e; /* Light grey */
    border-top: 5px solid var(--primary-pink); /* Pink */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none; /* Hidden by default */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- DRAG AND DROP ACTIVE STATE --- */
.upload-area.drag-active {
    border-color: var(--primary-blue);
    background: rgba(8, 217, 214, 0.1); /* Light blue tint */
    transform: scale(1.02);
}

/* --- RESULT BOX (Flexible Shape) --- */
.art-preview {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    line-height: 8px;
    white-space: pre;
    overflow-x: auto;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;

    width: fit-content;
    min-width: 300px;
    max-width: 100%;
    height: auto;
    min-height: 50px;
    margin: 0 auto;

    display: block;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

/* --- COPY BUTTON FOR ART TOOL --- */
.result-wrapper {
    position: relative; /* Allows button positioning */
    margin-top: 20px;
}

.art-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
    z-index: 10;
}

.art-copy-btn:hover {
    background: var(--primary-blue);
    color: #000;
    border-color: var(--primary-blue);
}

/* --- SMART GENERATION TOGGLE --- */
.smart-mode-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* When Toggled ON */
input:checked + .slider {
    background: linear-gradient(45deg, var(--primary-pink), var(--accent-purple));
    box-shadow: 0 0 15px rgba(255, 46, 99, 0.6);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.smart-label {
    font-weight: bold;
    color: var(--text-gray);
    font-size: 1rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Glow effect for text when ON */
.smart-active-text {
    color: white;
    text-shadow: 0 0 8px var(--primary-pink);
}
