/* 
    AI Instagram Caption Generator - Modern Light/Grey Design System
    Developer: Antigravity AI
*/

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

:root {
    --bg-color: #f4f7f6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.08);
    --primary-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --text-main: #2d3436;
    --text-muted: #636e72;
    --accent-glow: rgba(220, 39, 67, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(188, 24, 136, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(240, 148, 51, 0.03) 0%, transparent 40%);
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    z-index: 1;
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Input Card */
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dfe6e9;
    border-radius: 12px;
    padding: 15px;
    color: var(--text-main);
    font-size: 1rem;
    resize: none;
    transition: var(--transition-smooth);
}

textarea:focus {
    outline: none;
    border-color: #dc2743;
    box-shadow: 0 0 0 4px rgba(220, 39, 67, 0.05);
}

.dropdown-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dfe6e9;
    border-radius: 12px;
    padding: 12px;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23636e72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Button UI */
.btn-generate {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 14px;
    padding: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    filter: brightness(1.05);
}

/* Results Section */
#results-container {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.result-card:hover {
    border-color: #dc2743;
    transform: scale(1.01);
}

.hook-line {
    color: #e6683c;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: block;
}

.caption-content {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #dfe6e9;
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    background: #f8f9fa;
    border-color: #b2bec3;
}

.btn-whatsapp {
    background: #25D366;
    border: none;
    color: white;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    color: white;
}

/* Hashtags section */
.hashtag-section {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.hashtag-list {
    color: #0984e3;
    word-break: break-all;
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Monetization section */
.adsense-placeholder {
    width: 100%;
    height: 100px;
    background: #fff;
    border: 1px dashed #dfe6e9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    border-radius: 15px;
    margin-bottom: 40px;
}

.tool-link {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.tool-link:hover {
    background: #f8f9fa;
    transform: translateY(-5px);
    border-color: #dc2743;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    color: white;
}

.tool-info h4 {
    color: var(--text-main);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Copy Toast */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3436;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    font-weight: 600;
    display: none;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp { from { bottom: -50px; opacity: 0; } to { bottom: 30px; opacity: 1; } }

/* Other tools grid */
.external-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}
