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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #6366f1;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark: #0f172a;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --light: #f8fafc;
    --border: #334155;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--slate-900);
    min-height: 100vh;
    padding: 20px;
    color: white;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 10%;
    left: 5%;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: 0;
    animation: blob1 10s infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: 0;
    animation: blob2 10s infinite alternate;
}

.back-to-home {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-to-home a:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

.back-to-home i {
    transition: transform 0.3s ease;
}

.back-to-home a:hover i {
    transform: translateX(-3px);
}

@keyframes blob1 {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, -20px) scale(1.1);
    }
}

@keyframes blob2 {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-20px, 20px) scale(1.1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-bottom: 1px solid var(--border);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(to right, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    color: var(--slate-400);
}

.tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: var(--slate-400);
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: white;
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-section {
    margin-bottom: 40px;
}

.input-section h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    background: var(--slate-800);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    color: white;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.8);
}

textarea::placeholder {
    color: var(--slate-400);
}

.settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--slate-400);
}

.setting-group input,
.setting-group select {
    padding: 10px;
    background: var(--slate-800);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: white;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.8);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group span {
    color: white;
    font-size: 0.95rem;
}

.generate-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.output-section {
    margin-top: 30px;
}

.output-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.output-box {
    min-height: 200px;
    padding: 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 15px;
    color: white;
}

.output-box.image-box,
.output-box.audio-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.output-box img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.output-box audio {
    width: 100%;
    margin-top: 10px;
}

.placeholder {
    color: var(--slate-400);
    text-align: center;
    font-style: italic;
}

.copy-btn {
    padding: 10px 20px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.copy-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.hidden {
    display: none !important;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--slate-400);
    margin-top: 20px;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid var(--danger-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        border-radius: 10px;
    }

    .tab-content {
        padding: 20px;
    }

    .settings {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid var(--border);
    }

    .tab-btn.active {
        border-bottom: 3px solid var(--primary-color);
    }
}

/* Success animation */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.success-pulse {
    animation: successPulse 0.5s ease;
}