/* ============================================
   AI Prompt Generator - Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-light: #252540;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --border: #2e2e4a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-3: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Gradient Animation */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.4);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}

/* Features Section */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Generator Section */
.generator {
    padding: 80px 0;
}

.generator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.prompt-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

.form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--primary-light);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    transition: var(--transition);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.model-info {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    display: none;
}

.model-info.show {
    display: block;
}

textarea {
    width: 100%;
    padding: 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea::placeholder {
    color: var(--text-dim);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-label input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label input:checked ~ * {
    color: var(--primary-light);
}

/* Submit Button */
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 36px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button.loading .button-text,
.submit-button.loading .button-icon {
    opacity: 0;
}

.submit-button.loading .button-loader {
    opacity: 1;
}

.button-loader {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.button-icon {
    width: 20px;
    height: 20px;
}

/* Result Section */
.result-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.result-section.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.result-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
}

.result-header h3 svg {
    width: 24px;
    height: 24px;
    color: var(--success);
}

.result-header h3 span {
    color: var(--primary-light);
}

.result-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.result-content {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    overflow-x: auto;
}

.result-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
}

.result-tips {
    margin-top: 24px;
    padding: 20px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-md);
}

.result-tips h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.result-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-tips li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.result-tips li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Tips Section */
.tips-section {
    padding: 80px 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.tip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.tip-card:hover {
    border-color: var(--secondary);
    transform: translateY(-4px);
}

.tip-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 700;
    color: var(--surface-light);
    line-height: 1;
}

.tip-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    position: relative;
}

.tip-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--surface);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    width: 20px;
    height: 20px;
    color: var(--success);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .generator-card {
        padding: 24px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-label {
        width: 100%;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .tip-card {
        padding: 24px;
    }
}