:root {
    --primary: #2563eb;
    --navy: #0f172a;
}

body { font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

.navbar { position: fixed; top: 0; width: 100%; height: 60px; background: var(--navy); color: white; z-index: 1000; display: flex; align-items: center; }
.nav-container { width: 100%; max-width: 1024px; margin: 0 auto; display: flex; justify-content: space-between; padding: 0 20px; }
.logo { font-weight: 800; font-size: 1.2rem; }
.logo span { color: var(--primary); }

.bottom-tab-bar { position: fixed; bottom: 0; left: 0; display: flex; z-index: 1000; width: 100%; height: var(--tab-bar-height); background: var(--tab-bar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--tab-border); padding-bottom: env(safe-area-inset-bottom);}
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; border: none; padding: 0 4px; color: var(--tab-text-inactive); font-size: 0.65rem; font-weight: 600; cursor: pointer; transition: var(--tab-transition); overflow: hidden;}
.tab-item i { color: #94a3b8; transition: color 0.2s ease;}
.tab-item.active i { color: #3b82f6;}
.tab-item.active span { color: #3b82f6;}

.hero-section { background: linear-gradient(135deg, var(--navy) 0%, #1e293b 100%); padding: 100px 20px 80px; text-align: center; color: white; }
.hero-section h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.hero-section p { font-size: 0.85rem; opacity: 0.7; max-width: 280px; margin: 0 auto; }

.card { background: white; border-radius: 18px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03); }
.label { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }
.timer-badge { font-family: monospace; font-weight: 700; color: var(--primary); background: #eff6ff; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.email-field { background: #f1f5f9; border-radius: 12px; padding: 8px 12px; display: flex; align-items: center; }
.section-title { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: white; width: 100%; max-width: 420px; border-radius: 24px; overflow: hidden; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 16px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }

.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--navy); color: white; padding: 8px 20px; border-radius: 30px; font-size: 11px; opacity: 0; transition: 0.3s; z-index: 4000; pointer-events: none; }

.refresh-btn { font-size: 10px; font-weight: 700; color: var(--primary); background: #eff6ff; padding: 6px 12px; border-radius: 8px; }
.dropdown-content { position: absolute; right: 20px; top: 60px; background: white; min-width: 160px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: none; border: 1px solid #e2e8f0; overflow: hidden; }
.dropdown-content.show { display: block; }
.dropdown-content a { display: block; padding: 12px 16px; color: var(--navy); font-size: 12px; font-weight: 500; border-bottom: 1px solid #f8fafc; }

.hidden { display: none !important; }

/* MOBILE FIRST STYLES (Default) */
.image-gen-wrapper {
    font-family: sans-serif;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    padding: 20px; /* Smaller padding for mobile */
}

.container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 100%; /* Full width on mobile */
    max-width: 450px;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    display: flex;
    flex-direction: column; /* Stack input and button on mobile */
    gap: 10px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    box-sizing: border-box;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s ease;
}

button:disabled {
    background: #ccc;
}

#output-section {
    margin-top: 20px;
    min-height: 200px;
    border: 2px dashed #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#output-section img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.error-box {
    color: #d9534f;
    font-size: 14px;
    padding: 15px;
}

#status-text {
    color: #888;
    font-size: 14px;
}

/* TABLET & DESKTOP STYLES */
@media (min-width: 768px) {
    .image-gen-wrapper {
        padding: 40px;
    }

    .input-group {
        flex-direction: row; /* Side by side on larger screens */
    }

    input {
        flex: 1; /* Input takes remaining space */
    }

    button {
        width: auto;
    }
}

