* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header.header {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #2d3748;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #4a5568;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

nav.lang-selector {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

nav.lang-selector label {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav.lang-selector select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.lang-selector select:hover {
    border-color: #667eea;
    background: white;
}

nav.lang-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

main.converter-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.gender-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 12px;
    border: none;
}

.gender-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.gender-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.gender-tab.active {
    color: white;
    background: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.input-group {
    margin-bottom: 2rem;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-field label {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.input-field select,
.input-field input {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.input-field select:focus,
.input-field input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

section.results {
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2.5rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results h3 {
    color: #0f172a;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.size-item {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease;
}

.size-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.size-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.size-value {
    font-size: 1.75rem;
    color: #667eea;
    font-weight: 800;
}

.note {
    color: #64748b;
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

article.info-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    color: #1e293b;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.75rem;
}

.info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #667eea;
    border-radius: 2px;
}

.info-section h3 {
    color: #334155;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.info-section h4 {
    color: #475569;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-section p {
    color: #475569;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.info-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #475569;
}

.info-section li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    position: relative;
    padding-left: 0.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

thead {
    background: #f8fafc;
    color: #1e293b;
}

th {
    padding: 1.25rem 1rem;
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-weight: 500;
}

tbody tr:hover {
    background: #f1f5f9;
}

tbody tr:last-child td {
    border-bottom: none;
}

strong {
    color: #667eea;
    font-weight: 700;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header.header,
    main.converter-card,
    article.info-section {
        padding: 2rem 1.5rem;
    }

    .gender-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .gender-tab {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }
}

/* RTL Support */
[dir="rtl"] .info-section ul {
    margin-right: 1.5rem;
    margin-left: 0;
}

[dir="rtl"] .info-section li {
    padding-right: 0.5rem;
    padding-left: 0;
}

[dir="rtl"] table {
    direction: rtl;
}


[dir="rtl"] .info-section h2::after {
    left: auto;
    right: 0;
}

/* AdSense Styles */
.ad-container {
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    min-height: 90px;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-top {
    margin-top: 0;
    margin-bottom: 25px;
}

.ad-mid {
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .ad-container {
        margin: 15px auto;
        min-height: 50px;
    }
}

/* SEO Enhanced Content Styles */
.key-takeaways {
    background: #f0f7ff;
    border-left: 5px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08);
}

.key-takeaways h3 {
    margin-top: 0 !important;
    color: #2d3748;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.key-takeaways ul {
    margin-bottom: 0 !important;
}

.toc-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.toc-container h3 {
    margin-top: 0 !important;
    font-size: 1.1rem;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.toc-container ul {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

.toc-container li {
    padding-left: 0 !important;
    margin-bottom: 0.5rem !important;
}

.toc-container a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.toc-container a:hover {
    color: #764ba2;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .key-takeaways {
        padding: 1.25rem;
    }
}
