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

:root {
    --primary-color: #6366f1;
    --primary-hover: #3f43ff;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #F5F5F5;
    --card-bg: #ffffff;
    --text-primary: #0E1525;
    --text-secondary: #525252;
    --text-muted: #737373;
    --border-color: #E5E5E5;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--text-primary);
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Prevent horizontal scroll on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.nav-close:hover {
    color: #ffffff;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #ffffff;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    margin-left: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-cta-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.nav-close:hover {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #F5F5F5 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 245, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(242, 98, 7, 0.25);
}

.hero-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 98, 7, 0.35);
}

.hero-cta svg {
    flex-shrink: 0;
}

/* Dictionary Hero Section */
.dictionary-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    text-align: center;
    color: #ffffff;
}

.dictionary-hero-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.dictionary-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dictionary-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-quick-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.mini-stat {
    text-align: center;
}

.mini-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.mini-stat-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .dictionary-hero {
        padding: 3rem 1.5rem 2.5rem;
    }

    .dictionary-hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .dictionary-hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-stats-mini {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .mini-stat-number {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

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

    .hero-cta {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Main Translation Section */
.main-translation-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.translation-container {
    max-width: 1200px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.translation-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.translation-box:hover {
    box-shadow: 0 8px 30px rgba(242, 98, 7, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.translation-box-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.translation-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.translation-box-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.translation-box-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.translation-form {
    margin-bottom: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.translation-input-modern {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.translation-input-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(242, 98, 7, 0.1);
}

.translate-btn-modern {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.translate-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 98, 7, 0.4);
}

.suggestions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestions-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.suggestion-chip {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chip:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Features Modern */
.features-modern {
    max-width: 1200px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-modern {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-modern:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(242, 98, 7, 0.1);
    transform: translateY(-4px);
}

.feature-modern-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(242, 98, 7, 0.1), rgba(247, 127, 57, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.feature-modern-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.feature-modern-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Additional Tools */
.additional-tools {
    max-width: 1200px;
    margin: 0 auto;
}

.tools-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.tools-grid {
    display: grid;
    gap: 1rem;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(242, 98, 7, 0.15);
    transform: translateX(8px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(242, 98, 7, 0.1), rgba(247, 127, 57, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.tool-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.tool-arrow {
    margin-left: auto;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .main-translation-section {
        padding: 2rem 1rem;
    }

    .translation-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .translation-box {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .translation-box-header {
        flex-direction: row;
        align-items: center;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .translate-btn-modern {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

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

    .feature-modern {
        padding: 1.5rem 1rem;
    }

    .dictionary-search {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-group {
        flex-direction: column;
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .dictionary-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-card {
        width: 100%;
        padding: 1.25rem 2rem;
    }

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

/* Dictionary Section */
.dictionary-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.dictionary-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.dictionary-search {
    max-width: 800px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 98, 7, 0.1);
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 98, 7, 0.1);
}

.dictionary-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 200px;
}

.word-card {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.word-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.word-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(242, 98, 7, 0.15);
    transform: translateY(-4px);
}

.word-card:hover::before {
    opacity: 1;
}

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

.word-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

.word-type {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.word-meaning {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(242, 98, 7, 0.25);
}

.btn-load-more:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 98, 7, 0.35);
}

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

.loading-state,
.error-state,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0.5rem 0;
}

.empty-subtitle {
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
}

/* Translation Converters Section */
.translation-converters {
    max-width: 1000px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

.converters-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

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

.converter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.converter-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(242, 98, 7, 0.15);
}

.converter-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.converter-header svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.converter-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.converter-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.converter-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.converter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.converter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 98, 7, 0.1);
}

.converter-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.converter-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 98, 7, 0.3);
}

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

.converter-result {
    min-height: 80px;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.converter-result.success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.converter-result.error {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
    color: var(--danger-color);
}

.converter-result-word {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.converter-result-type {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.converter-result-meaning {
    color: var(--text-primary);
    line-height: 1.6;
}

.converter-result-matches {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converter-match-item {
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.converter-match-word {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Responsive Converter Styles */
@media (max-width: 768px) {
    .translation-converters {
        padding: 1.5rem 1rem;
    }

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

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

    .converter-btn {
        width: 100%;
    }
}

/* Translation Page Styles */
.translation-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.translation-header {
    max-width: 900px;
    margin: 0 auto 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 0.75rem;
}

.translation-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.translation-search-box {
    max-width: 900px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 1rem;
}

.translation-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.translation-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 98, 7, 0.1);
}

.translation-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.translation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 98, 7, 0.35);
}

.api-info-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
}

.api-info-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .translation-page {
        padding: 1rem;
    }

    .translation-title {
        font-size: 1.5rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .translation-search-box {
        flex-direction: column;
    }

    .translation-input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .translation-btn {
        width: 100%;
        min-height: 48px;
    }

    .result-word {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .result-meaning {
        font-size: 1.125rem;
    }

    .match-word {
        font-size: 1.25rem;
    }

    .api-info-section {
        padding: 1rem;
    }

    .api-endpoint {
        font-size: 0.75rem;
        overflow-x: auto;
    }
}

/* Responsive Dictionary Styles */
@media (max-width: 768px) {
    .dictionary-section {
        padding: 3rem 1rem;
    }

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

    .search-box {
        min-width: 100%;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .dictionary-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-card {
        flex: 1;
        min-width: 140px;
        padding: 1rem 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

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

/* Features Section */
.features,
.dictionary-features {
    padding: 5rem 2rem;
    background: #ffffff;
}

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

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

.feature-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #f8f8f8;
    color: var(--text-secondary);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #667eea;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 1rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.header-content h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-shadow: none;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

main {
    display: grid;
    gap: 2rem;
}

.card {
    background: transparent;
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.2s ease;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.card-header h2 {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    -webkit-appearance: none;
    /* Remove default iOS styling */
    appearance: none;
    background-color: white;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 98, 7, 0.1);
}

.subject-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    align-items: center;
}

.subject-name {
    grid-column: 1;
}

.subject-priority {
    grid-column: 2;
    min-width: 150px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

.btn-generate {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-remove {
    color: var(--danger-color);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.timetable-container {
    margin-top: 2rem;
}

.day-schedule {
    margin-bottom: 2rem;
}

.day-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.schedule-items {
    display: grid;
    gap: 0.75rem;
}

.schedule-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    align-items: center;
    transition: all 0.2s ease;
    overflow: hidden;
    /* Prevent content overflow */
    word-wrap: break-word;
}

.schedule-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.schedule-item.break {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.schedule-item.priority-high {
    border-left-color: var(--danger-color);
}

.schedule-item.priority-medium {
    border-left-color: var(--warning-color);
}

.schedule-item.priority-low {
    border-left-color: var(--success-color);
}

.time-slot {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.subject-name-display {
    font-weight: 500;
    color: var(--text-primary);
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.priority-low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.priority-break {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading p {
    color: white;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }

    header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .header-content h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .subject-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.875rem;
    }

    .subject-name,
    .subject-priority {
        width: 100%;
    }

    .subject-priority {
        min-width: auto;
    }

    .btn-remove {
        width: 100%;
        height: 2.25rem;
        font-size: 1.25rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 0.5rem;
    }

    .card h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .input {
        padding: 0.875rem;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        min-height: 44px;
        /* Touch target size */
    }

    .btn-generate {
        padding: 1rem;
        font-size: 1.05rem;
    }

    .schedule-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .time-slot {
        font-size: 0.8125rem;
    }

    .subject-name-display {
        font-size: 0.95rem;
    }

    .card-header {
        flex-direction: column;
        gap: 0.875rem;
        align-items: stretch;
    }

    .button-group {
        width: 100%;
    }

    .timetable-container {
        margin-top: 1.5rem;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .form-container,
    .btn,
    header {
        display: none !important;
    }

    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

.button-group {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .button-group {
        flex-direction: column;
        width: 100%;
        gap: 0.625rem;
    }

    .button-group .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .wallpaper-modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }

    .phone-preview {
        width: 180px;
        height: 390px;
        border-width: 6px;
        border-radius: 24px;
    }

    .customization-panel {
        padding: 1rem;
    }

    .customization-panel h3 {
        font-size: 1.125rem;
        margin-bottom: 0.875rem;
    }

    .form-group label {
        font-size: 0.8125rem;
    }
}

/* Mobile Menu Overlay */
.nav-overlay {
    display: none;
}

@media (max-width: 768px) {
    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1050;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 1150;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background: #1E1E2F;
        backdrop-filter: blur(10px);
        padding: 4rem 2rem 2rem;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        align-items: flex-start;
        z-index: 1200;
        overflow-y: auto;
        visibility: hidden;
    }

    .nav-menu.active {
        right: 0;
        visibility: visible;
    }

    .nav-close {
        display: block;
        color: #ffffff;
        z-index: 1;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        color: #ffffff;
    }

    .nav-cta-btn {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        background: #ffffff;
        color: var(--primary-color);
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.modal-content {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wallpaper-modal {
    max-width: 1200px;
    width: 95%;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.preview-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.customization-panel {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.wallpaper-preview-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.phone-preview {
    width: 270px;
    height: 585px;
    border: 8px solid #333;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: white;
    position: relative;
}

.phone-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    z-index: 10;
}

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

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Custom Quote Group */
#custom-quote-group {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Textarea styling */
textarea.input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

@media (max-width: 1024px) {
    .preview-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .wallpaper-preview-display {
        order: -1;
        margin-bottom: 1rem;
    }

    .phone-preview {
        width: 240px;
        height: 520px;
    }
}

@media (max-width: 640px) {
    .phone-preview {
        width: 216px;
        height: 468px;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal {
        padding: 0;
        align-items: flex-start;
    }

    .wallpaper-modal {
        border-radius: 1rem 1rem 0 0;
        margin-top: 2rem;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 1rem;
        right: 1rem;
    }
}

/* Wallpaper Preview Styling */
.wallpaper-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.wallpaper-preview-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: transparent;
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.wallpaper-preview-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: transparent;
    bottom: -150px;
    left: -150px;
    border-radius: 50%;
}

.phone-mockup {
    position: relative;
    width: 300px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 20px rgba(242, 98, 7, 0.2);
    z-index: 1;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 0 0 20px 20px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #0a0a0a;
    border-radius: 3px;
}

.phone-notch::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: #1a4d2e;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(26, 77, 46, 0.8);
}

.phone-screen {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.8) inset;
}

.phone-screen canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
}

@media (max-width: 768px) {
    .phone-mockup {
        width: 250px;
    }

    .wallpaper-preview-wrapper {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .phone-mockup {
        width: 200px;
    }

    .container {
        padding: 0.75rem 0.5rem;
    }

    header {
        padding: 1.5rem 0.75rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .card {
        padding: 1rem;
    }

    .card h2 {
        font-size: 1.125rem;
    }

    .input,
    select.input,
    textarea.input {
        font-size: 16px;
        /* Prevents zoom on mobile */
        padding: 0.75rem;
    }

    .btn {
        font-size: 0.9375rem;
        padding: 0.8125rem 1rem;
        min-height: 44px;
    }

    .btn-generate {
        font-size: 1rem;
        padding: 0.9375rem;
    }

    .schedule-item {
        padding: 0.875rem;
        gap: 0.375rem;
    }

    .time-slot {
        font-size: 0.75rem;
    }

    .subject-name-display {
        font-size: 0.875rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .modal h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .wallpaper-modal {
        padding: 1rem 0.75rem;
    }

    .customization-panel {
        padding: 0.875rem;
    }

    .phone-preview {
        width: 160px;
        height: 346px;
        border-width: 5px;
        border-radius: 20px;
    }

    .phone-preview::before {
        width: 60px;
        height: 5px;
        top: 8px;
    }

    .subject-item {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .button-group {
        gap: 0.5rem;
    }

    .loading p {
        font-size: 1rem;
    }

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

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

    .hero-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .dictionary-hero-title {
        font-size: 1.75rem;
    }

    .dictionary-hero-subtitle {
        font-size: 0.875rem;
    }

    .translation-box {
        padding: 1.25rem;
    }

    .word-card {
        padding: 1.25rem;
    }

    .word-title {
        font-size: 1.125rem;
    }

    .search-input,
    .converter-input {
        font-size: 16px;
        /* Prevents zoom */
        padding: 0.875rem 1rem 0.875rem 3rem;
    }

    .hero-quick-links {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-link {
        justify-content: center;
    }
}

/* Additional mobile optimizations */
@media (max-width: 360px) {
    .header-content h1 {
        font-size: 1.375rem;
    }

    .phone-preview {
        width: 140px;
        height: 303px;
    }

    .card {
        padding: 0.875rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

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

    .dictionary-hero-title {
        font-size: 1.5rem;
    }

    .dictionary-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .translation-box,
    .word-card,
    .feature-modern {
        padding: 1rem;
    }

    .nav-container {
        padding: 0;
    }

    .navbar {
        padding: 0.75rem;
    }
}

/* Improve touch targets for all mobile devices */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .input,
    select,
    textarea {
        min-height: 44px;
        /* Apple's recommended touch target size */
    }

    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .translate-btn-modern,
    .btn-load-more,
    .converter-btn,
    .hero-cta,
    .quick-link {
        min-height: 48px;
    }

    .word-card:hover {
        transform: none;
        /* Disable transform on touch devices to prevent issues */
    }
}

.input-wrapper {
    position: relative;
}

/* API Documentation Styles */
.api-docs-section {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow-x: hidden;
    width: 100%;
}

.api-docs-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    max-width: 100%;
}

.api-docs-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.api-docs-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    word-wrap: break-word;
}

.api-docs-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.api-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.api-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.api-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.api-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.75rem 0;
}

.api-section p {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

.api-feature-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.api-feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(242, 98, 7, 0.15);
}

.api-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.api-feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.api-feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
    border: 2px solid #334155;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block pre {
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.endpoint-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.http-method {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.http-method.get {
    background: #10b981;
    color: #ffffff;
}

.http-method.post {
    background: #3b82f6;
    color: #ffffff;
}

.endpoint-path {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.95rem;
    color: var(--primary-color);
    background: rgba(242, 98, 7, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    word-break: break-all;
}

.endpoint-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.params-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
}

.params-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.params-table td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.params-table code {
    background: rgba(242, 98, 7, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
}

/* Mobile Responsive Styles for API Docs */
@media (max-width: 768px) {
    .api-docs-section {
        padding: 1rem 0.75rem;
    }

    .api-docs-header {
        padding: 1.5rem 0.5rem;
        margin-bottom: 2rem;
    }

    .api-docs-header h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .api-docs-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        word-wrap: break-word;
        padding: 0 0.5rem;
    }

    .api-section {
        padding: 1.25rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
        overflow-x: hidden;
    }

    .api-section h2 {
        font-size: 1.375rem;
        word-wrap: break-word;
    }

    .api-section h3 {
        font-size: 1.125rem;
        word-wrap: break-word;
    }

    .api-section h4 {
        font-size: 1rem;
    }

    .api-section p {
        font-size: 0.9375rem;
        word-wrap: break-word;
    }

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

    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .endpoint-path {
        font-size: 0.75rem;
        word-break: break-all;
        width: 100%;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .code-block code,
    .code-block pre {
        font-size: 0.75rem;
    }

    /* Make tables responsive */
    .params-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .params-table thead {
        display: none;
    }

    .params-table,
    .params-table tbody,
    .params-table tr,
    .params-table td {
        display: block;
    }

    .params-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
    }

    .params-table td {
        text-align: right;
        padding: 0.75rem 1rem;
        position: relative;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    .params-table td:last-child {
        border-bottom: none;
    }

    .params-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 600;
        color: var(--text-primary);
    }
}

@media (max-width: 480px) {
    .api-docs-section {
        padding: 0.75rem 0.5rem;
    }

    .api-docs-header {
        padding: 1.25rem 0.25rem;
        margin-bottom: 1.5rem;
    }

    .api-docs-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .api-docs-subtitle {
        font-size: 0.875rem;
        line-height: 1.4;
        padding: 0 0.25rem;
    }

    .api-section {
        padding: 1rem 0.875rem;
    }

    .endpoint-card {
        padding: 1rem;
    }

    .http-method {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .endpoint-path {
        font-size: 0.7rem;
        word-break: break-all;
    }

    .code-block {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .api-feature-card {
        padding: 1rem;
    }

    .api-feature-icon {
        font-size: 2rem;
    }

    .api-section h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    .api-docs-header h1 {
        font-size: 1.5rem;
    }

    .api-section {
        padding: 1rem;
    }

    .api-section h2 {
        font-size: 1.25rem;
    }
}