:root {
    --bg-color: #0d0f14;
    --text-main: #f0f2f5;
    --text-muted: #949ba4;
    --glass-bg: rgba(25, 28, 36, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #6c5ce7;
    --accent-hover: #8172ea;
    --success: #00b894;
    --blob-1: #4a00e0;
    --blob-2: #8e2de2;
    --nav-bg: rgba(15, 17, 21, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Blobs */
.background-blobs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; overflow: hidden; filter: blur(120px);
}
.blob { position: absolute; border-radius: 50%; opacity: 0.4; animation: float 20s infinite ease-in-out alternate; }
.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: var(--blob-1); animation-delay: -5s; }
.blob-2 { bottom: -20%; right: -10%; width: 700px; height: 700px; background: var(--blob-2); }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(100px, 50px) scale(1.1); } }

/* Header */
.glass-header {
    background: var(--glass-bg); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0; z-index: 100;
}
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 0 1rem; }
.glass-header h1 { font-size: 1.1rem; font-weight: 700; }
.run-meta { font-size: 0.75rem; color: var(--text-muted); text-align: right; }

.content-area { 
    padding: 1rem;
    padding-bottom: 120px;
}

/* Tabs */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Prompt Section */
.prompt-section-title {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.prompt-container {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.prompt-text { font-size: 0.95rem; line-height: 1.5; color: var(--text-main); word-wrap: break-word; }
.prompt-text h3 { color: var(--accent); margin-top: 1rem; margin-bottom: 0.5rem; font-size: 1rem; }
.prompt-text h3:first-child { margin-top: 0; }

.floating-action {
    position: fixed; bottom: 80px; left: 0; width: 100%; padding: 0 1rem; z-index: 90;
}
.btn-massive {
    width: 100%; background: var(--accent); color: white; border: none;
    padding: 1rem; font-size: 1rem; font-weight: 700; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4); cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 0.75rem;
}
.btn-massive:active { transform: scale(0.98); }
.btn-massive.copied { background: var(--success); box-shadow: 0 8px 24px rgba(0, 184, 148, 0.4); }

/* Images Section (RESPONSIVE GRID LAYOUT) */
.images-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Si adatta perfettamente a PC e Mobile */
    gap: 1rem; 
}

.img-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #000;
}

.img-card img {
    width: 100%; 
    height: auto; 
    display: block;
}

.img-header {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 0.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    color: white; font-size: 0.8rem; font-weight: 600; text-align: left;
}
.dl-massive-btn {
    position: absolute; bottom: 0.5rem; right: 0.5rem;
    background: rgba(255,255,255,0.25); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.4); color: white;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1rem; text-decoration: none; transition: background 0.2s;
}
.dl-massive-btn:active, .dl-massive-btn:hover { background: rgba(255,255,255,0.5); }

/* Loader */
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50vh; gap: 1rem; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--glass-border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--nav-bg); backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border); display: flex; justify-content: space-around;
    padding: 0.75rem 0; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); z-index: 100;
}
.nav-item {
    background: none; border: none; color: var(--text-muted); font-size: 0.8rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: 1; cursor: pointer;
}
.nav-item i { font-size: 1.3rem; }
.nav-item.active { color: var(--accent); font-weight: 600; }
