/* AI Message Generator - Main Stylesheet */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3.5em;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: fadeInDown 0.8s ease;
}

h2 {
    font-size: 2.2em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.3em;
    color: rgba(255,255,255,0.95);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.usage-indicator {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: -40px auto 60px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr minmax(auto, 900px) 1fr;
    gap: 20px;
    align-items: start;
}

.generator-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    animation: fadeInUp 0.8s ease;
}

/* Side Ads */
.side-ad {
    position: sticky;
    top: 20px;
    min-height: 600px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-ad::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-ad-left {
    animation: slideInLeft 0.8s ease;
}

.side-ad-right {
    animation: slideInRight 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bottom Ad Section */
.bottom-ad-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    min-height: 120px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

textarea::placeholder {
    color: #9ca3af;
}

/* Ad Container Styling */
.ad-container {
    margin: 30px -20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px dashed #e5e7eb;
}

.ad-container::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-ad-container {
    margin: 25px 0;
}

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

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.char-limit-info {
    display: inline-block;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-top: 5px;
    font-weight: 500;
}

.recaptcha-wrapper {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.generate-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

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

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

.loader {
    display: none;
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-section {
    margin-top: 30px;
    display: none;
    animation: slideIn 0.5s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.char-counter {
    font-size: 14px;
    color: #6b7280;
    padding: 5px 10px;
    background: #f3f4f6;
    border-radius: 20px;
    font-weight: 500;
}

.result-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    min-height: 100px;
}

.generated-message {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 80px;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copy-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #10b981;
}

.error-alert, .success-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.error-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.success-alert {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: #f9fafb;
}

.features-header {
    text-align: center;
    margin-bottom: 50px;
}

.features-header h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1f2937;
}

.features-description {
    font-size: 1.1em;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 35px 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #2563eb;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 21px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 15px;
}

/* SEO Content Section */
.seo-content {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.info-section {
    background: #f9fafb;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
}

.info-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

.info-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-section ul {
    margin-left: 20px;
    color: #4b5563;
}

.info-section li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.info-section strong {
    color: #374151;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 60px 20px 30px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2563eb, #7c3aed, transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #e5e7eb;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: #60a5fa;
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .side-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    .generator-card {
        padding: 25px;
    }
    
    .options-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .ad-container {
        margin: 20px 0;
    }
    
    .bottom-ad-section {
        margin: 40px auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* Loading State */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Print Styles */
@media print {
    .header-section,
    footer,
    .generate-btn,
    .copy-btn,
    .ad-container {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .generator-card {
        box-shadow: none;
        border: 1px solid #333;
    }
}