/* Fire Text Generator - Main Stylesheet */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fire-red: #ff4500;
    --fire-orange: #ff6600;
    --fire-yellow: #ffcc00;
    --fire-dark: #1a0a00;
    --fire-darker: #0d0500;
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2937;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --border-color: #374151;
    --accent: #ff6600;
    --accent-hover: #ff4500;
    --success: #10b981;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--fire-yellow);
}

/* Navbar */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo:hover {
    color: var(--fire-orange);
}

.fire-icon {
    font-size: 1.6rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--fire-orange);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fire-orange);
    border-radius: 1px;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--fire-orange);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    list-style: none;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: 5px;
}

.language-selector:hover .lang-dropdown {
    display: block;
}

.lang-dropdown li a {
    display: block;
    padding: 8px 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lang-dropdown li a:hover {
    background: var(--bg-secondary);
    color: var(--fire-orange);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--fire-yellow), var(--fire-orange), var(--fire-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Generator Section */
.generator-section {
    padding: 40px 0;
}

.generator-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label,
.output-group label,
.style-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

#input-text {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

#input-text:focus {
    outline: none;
    border-color: var(--fire-orange);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

#input-text::placeholder {
    color: var(--text-muted);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Style Selector */
.style-selector {
    margin-bottom: 25px;
}

.style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.style-btn {
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.style-btn:hover {
    border-color: var(--fire-orange);
    color: var(--fire-orange);
}

.style-btn.active {
    background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
    border-color: var(--fire-orange);
    color: white;
    font-weight: 600;
}

/* Output */
.output-group {
    margin-bottom: 10px;
}

.output-box {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.2rem;
    word-break: break-all;
    line-height: 1.8;
    transition: var(--transition);
}

.output-box:empty::before {
    content: 'Your fire text will appear here...';
    color: var(--text-muted);
    font-style: italic;
}

.output-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy {
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-red));
    color: white;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.btn-clear {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-clear:hover {
    border-color: var(--fire-red);
    color: var(--fire-red);
}

.btn-download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-share {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Share Panel */
.share-panel {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.share-panel h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.share-link:hover {
    border-color: var(--fire-orange);
    color: var(--fire-orange);
    transform: translateY(-1px);
}

.share-url-group {
    display: flex;
    gap: 10px;
}

.share-url-group input {
    flex: 1;
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.btn-copy-link {
    padding: 10px 18px;
    background: var(--fire-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-copy-link:hover {
    background: var(--fire-red);
}

/* Section Title */
.section-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

/* Related Tools */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.related-tool-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: var(--transition);
    text-decoration: none;
}

.related-tool-card:hover {
    border-color: var(--fire-orange);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.15);
}

.related-tool-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.related-tool-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Preview Section */
.preview-section {
    padding: 60px 0;
}

.preview-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.preview-card:hover {
    border-color: var(--fire-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 102, 0, 0.15);
}

.preview-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.preview-text {
    font-size: 1.4rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* Content Section */
.content-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.content-article h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-article ol,
.content-article ul {
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding-left: 25px;
}

.content-article li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* FAQ */
.faq-list {
    margin-top: 20px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 15px;
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Footer */
footer {
    background: var(--fire-darker);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--fire-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Page Styles (About, Contact, etc.) */
.page-header {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.page-content {
    padding: 50px 0;
}

.page-content .container {
    max-width: 800px;
}

.page-content h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 12px;
}

.page-content p,
.page-content li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.page-content ul {
    padding-left: 25px;
    margin-bottom: 15px;
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--fire-orange);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-red));
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .generator-box {
        padding: 20px;
    }

    .style-options {
        gap: 8px;
    }

    .style-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .output-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .preview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .style-options {
        flex-direction: column;
    }

    .style-btn {
        width: 100%;
        text-align: center;
    }

    .controls-row {
        flex-direction: column;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Canvas Fire Generator Styles ===== */

/* Fire Input */
.fire-input {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.fire-input:focus {
    outline: none;
    border-color: var(--fire-orange);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.fire-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
}

/* Controls Row */
.controls-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 150px;
}

.control-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Fire Select */
.fire-select {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23adb5bd' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.fire-select:focus {
    outline: none;
    border-color: var(--fire-orange);
}

.fire-select:hover {
    border-color: var(--fire-orange);
}

/* Fire Range Slider */
.fire-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-secondary);
    outline: none;
    appearance: none;
    cursor: pointer;
    margin-top: 5px;
}

.fire-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-red));
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 102, 0, 0.4);
    transition: transform 0.2s ease;
}

.fire-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.fire-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-red));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 102, 0, 0.4);
}

/* Generate Button */
.btn-generate {
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-red));
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.5);
}

.btn-generate:active {
    transform: translateY(0);
}

/* Preset Selector */
.preset-selector {
    margin-bottom: 25px;
}

.preset-selector h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover {
    border-color: var(--fire-orange);
    transform: translateY(-2px);
}

.preset-btn.active {
    border-color: var(--fire-orange);
    background: rgba(255, 102, 0, 0.1);
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

.preset-preview {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.preset-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.preset-btn.active .preset-name {
    color: var(--fire-orange);
}

/* Canvas Container */
.canvas-container {
    margin-bottom: 20px;
}

.canvas-container h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.canvas-wrapper {
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.canvas-wrapper canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Download Buttons */
.btn-download-trans {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.btn-download-trans:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Responsive adjustments for preset grid */
@media (max-width: 768px) {
    .preset-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        min-width: unset;
    }

    .output-actions {
        flex-direction: column;
    }

    .output-actions .btn {
        justify-content: center;
    }
}
