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

:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --light-blue: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: white;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 64px;
    z-index: 999;
    padding: 10px 0;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-menu a:hover {
    background: var(--bg-color);
    border-left-color: var(--primary-blue);
    padding-left: 25px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Input Section */
.input-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.input-wrapper {
    margin-bottom: 25px;
}

.text-input {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.text-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Slider Section */
.slider-section {
    margin-bottom: 25px;
}

.slider-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.font-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.font-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.font-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: var(--text-dark);
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0a66c2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.telegram {
    background: #0088cc;
}

/* Toggle Section */
.toggle-section {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-blue);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Font Display Section */
.font-display-section {
    margin-bottom: 40px;
}

.font-category {
    margin-bottom: 40px;
}

.category-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.font-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    word-wrap: break-word;
    position: relative;
    overflow: hidden;
}

.font-item::before {
    content: 'Click to Copy';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.font-item:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.font-item:hover::before {
    opacity: 1;
}

.font-item:active {
    transform: scale(0.98);
}

.font-style-name {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.font-text {
    font-size: 18px;
    color: var(--text-dark);
    word-break: break-word;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.load-more-btn:active {
    transform: scale(0.98);
}

.load-more-btn i {
    margin-right: 8px;
}

/* Category Section */
.category-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.category-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Content Sections */
.content-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.content-card {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.8;
}

.content-card p {
    margin-bottom: 15px;
}

.instruction-list {
    list-style-position: inside;
    margin-left: 0;
}

.instruction-list li,
.feature-list li {
    margin-bottom: 15px;
    padding-left: 10px;
}

.popular-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.style-example {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-blue);
    font-size: 14px;
}

.style-example strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 5px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.7;
}

/* Other Tools */
.other-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.tool-card i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.tool-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.footer p {
    margin: 5px 0;
    opacity: 0.9;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success-color);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 20px;
}

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

    .hero-description {
        font-size: 16px;
    }

    .text-input {
        font-size: 16px;
        padding: 15px;
    }

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

    .input-section,
    .content-section,
    .category-section {
        padding: 20px;
    }

    .section-title {
        font-size: 24px;
    }

    .features-grid,
    .popular-styles-grid,
    .other-tools-grid {
        grid-template-columns: 1fr;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .toast {
        right: 15px;
        bottom: 15px;
        left: 15px;
        transform: translateY(200px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .menu-toggle {
        font-size: 20px;
        padding: 8px 12px;
    }

    .hero-title {
        font-size: 26px;
    }

    .category-buttons {
        gap: 8px;
    }

    .category-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.font-item {
    animation: fadeIn 0.3s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Infinite Scroll Sentinel */
#scroll-sentinel {
    height: 10px;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}

/* Selection Color */
::selection {
    background: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background: var(--primary-blue);
    color: white;
}
