* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(ellipse at top, #0f0f23 0%, #1a0b2e 35%, #16213e 100%);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Header - Reduced padding from 25px to 15px */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 50px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.4s ease;
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text .title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #00ff88 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

/* Main Container */
.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 100px);
    padding: 40px 30px;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left Content */
.content-left {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 40px;
}

.main-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.highlight-gradient {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #ffa726 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

.highlight-electric {
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 50%, #ff00ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: electricPulse 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes electricPulse {
    0%, 100% { background-position: 0% 50%; filter: brightness(1); }
    50% { background-position: 100% 50%; filter: brightness(1.2); }
}

.main-description {
    font-size: 20px;
    line-height: 1.7;
    color: #cbd5e0;
    margin-bottom: 45px;
    max-width: 520px;
    font-weight: 400;
}

.cta-button {
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    color: #0a0a0a;
    padding: 20px 40px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 45px;
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.3);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
}

.feature-tags {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

/* Right Content - Template Preview */
.content-right {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.template-preview-container {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    position: relative;
}

.template-preview-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 212, 255, 0.2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
}

.template-header {
    margin-bottom: 25px;
}

.template-category {
    display: inline-block;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.template-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
}

.template-description {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

.prompt-section {
    margin-bottom: 25px;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prompt-header span {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
}

.copy-prompt-btn {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-prompt-btn:hover {
    background: rgba(0, 255, 136, 0.25);
    transform: scale(1.02);
}

.prompt-content {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    position: relative;
}

.prompt-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    white-space: pre-line;
}

.template-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    color: #0a0a0a;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 255, 136, 0.4);
}

.action-btn-secondary {
    flex: 1;
    background: rgba(102, 126, 234, 0.8);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 1);
}

.template-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading and Animation Styles */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dots-loader {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.dots-loader span {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dots-loader span:nth-child(1) { animation-delay: -0.32s; }
.dots-loader span:nth-child(2) { animation-delay: -0.16s; }
.dots-loader span:nth-child(3) { animation-delay: 0s; }

.generating-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    color: #888;
    font-size: 14px;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff6b6b;
    font-size: 14px;
    justify-content: center;
    height: 80px;
}

.error-icon {
    font-size: 18px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Styles */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    color: #000;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 60px;
    margin-top: 60px;
    color: #888;
    font-size: 16px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 16px;
}

.footer-link:hover {
    color: #00ff88;
}

.footer-copyright {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer:hover .footer-copyright {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px 25px;
        text-align: center;
    }
    
    .content-left {
        text-align: center;
        align-items: center;
        margin-left: 0;
        order: 1;
    }
    
    .content-right {
        order: 2;
    }
    
    .template-preview-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 25px;
    }
    
    .main-container {
        padding: 30px 20px;
    }
    
    .main-title {
        font-size: 42px;
    }
    
    .main-description {
        font-size: 18px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 18px 36px;
    }
    
    .generator-container {
        padding: 25px;
    }
    
    .feature-tags {
        justify-content: center;
    }
    
    #toast {
        bottom: 20px !important;
        right: 20px !important;
        left: 20px !important;
        font-size: 13px !important;
    }
}