/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero {
    background: var(--gradient);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.search-btn {
    background: var(--bg-white);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 2rem;
    font-weight: 700;
}

.stat span {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Tools Section */
.tools-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tool-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tool-badge.new-badge {
    background: linear-gradient(135deg, #ff4081 0%, #ff6b9d 100%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 64, 129, 0);
    }
}

/* Features Section */
.features-section {
    background: var(--bg-white);
    padding: 5rem 0;
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-gray);
}

/* Pricing Section */
.pricing-section {
    padding: 5rem 0;
}

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

.pricing-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 400;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.features-list li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Tool Page Styles */
.tool-page {
    min-height: 100vh;
    background: var(--bg-light);
}

.tool-header {
    background: var(--gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

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

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

.tool-container {
    max-width: 1000px;
    margin: -2rem auto 3rem;
    padding: 0 20px;
}

.tool-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.input-section {
    margin-bottom: 2rem;
}

.input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.input-section textarea,
.input-section input,
.input-section select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.input-section textarea:focus,
.input-section input:focus,
.input-section select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.generate-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

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

.output-section {
    margin-top: 2rem;
}

.output-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    min-height: 200px;
    border: 2px dashed var(--border-color);
}

.output-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
}

.download-btn {
    background: var(--success-color);
    color: white;
}

.clear-btn {
    background: var(--border-color);
    color: var(--text-dark);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-gray);
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .hero-stats {
        gap: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

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

    .pricing-card.featured {
        transform: scale(1);
    }

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

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

/* Examples Section */
.examples-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.examples-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.example-item {
    background: var(--bg-white);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.example-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

/* Success Message */
.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}
