/*
 * Strip Markdown - Main Stylesheet
 * Free online Markdown to Text converter with AI optimization
 * Perfect for social media platforms
 */

/* ==========================================================================
   RESET AND BASE STYLES
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    margin: 0;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.top-nav {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.lang-switch {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lang-switch:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

.main-content {
    padding: 1.5rem;
}

/* ==========================================================================
   TEXTAREA COMPONENTS
   ========================================================================== */

.textarea-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.example-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-example {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-example:hover {
    background: #e9ecef;
}

.btn-clear-small {
    background: #dc3545;
    color: white;
}

.btn-clear-small:hover {
    background: #c82333;
}

.textarea-wrapper {
    display: flex;
    flex-direction: column;
}

.textarea-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #4facfe;
}

/* ==========================================================================
   OPTIONS SECTION
   ========================================================================== */

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==========================================================================
   AI SECTION
   ========================================================================== */

.ai-section {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

.ai-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.input-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rate-limit-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-ai {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.3);
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   LOADING INDICATOR
   ========================================================================== */

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ==========================================================================
   LANDING PAGE SECTIONS
   ========================================================================== */

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin: 3rem 0;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta-feature {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* How to Use Section */
.how-to-section {
    background: white;
    padding: 4rem 2rem;
}

.how-to-content {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.how-to-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.step h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Features Section */
.features-section {
    background: #f8f9fa;
    padding: 4rem 2rem;
}

.features-content {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.feature h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 4rem 2rem;
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.faq-answer {
    color: #666;
    line-height: 1.7;
}

/* About Section */
.about-section {
    background: #f8f9fa;
    padding: 3rem 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

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

.use-case {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 1rem;
    }

    .textarea-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .options {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .buttons {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .top-nav {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .how-to-steps {
        grid-template-columns: 1fr;
    }

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

    .cta-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .use-cases {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cta-features {
        grid-template-columns: 1fr;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }

    .example-controls {
        flex-direction: column;
        gap: 0.3rem;
    }
}