* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --secondary: #00a8e8;
    --accent: #06b6d4;
    --success: #10b981;
    --dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'MV Typewriter', 'Faruma', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #ffffff;
    overflow-x: hidden;
}

a {
    color: var(--dark);
    transition: 0.2s;
    text-decoration: none;
}

a:hover {
    color: var(--text-light);
    transition: 0.2s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s;
}

header.scrolled {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.logo-icon img {
    width: 40px;
    height: 40px;
}

.logo-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-light);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    z-index: 1001;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* Hero Section with Map Layout */
.hero {
    margin-top: 80px;
    padding: 60px 0;
    background: linear-gradient(135deg, #0a1a3a 0%, #1a3b6c 50%, #2a5b9c 100%);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 102, 204, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 232, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    animation: gradientShift 15s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Hero Content on Left Side */
.hero-content {
    color: white;
    padding-right: 40px;
}

.hero-content .badge {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.1));
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: badgeGlow 3s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes badgeGlow {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 255, 255, 0.2),
            0 0 20px rgba(0, 168, 232, 0.2);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(0, 168, 232, 0.4);
    }
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 
        0 0 30px rgba(0, 168, 232, 0.8),
        0 0 60px rgba(6, 182, 212, 0.5),
        0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 600px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-btn-primary {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95), 
        rgba(255, 255, 255, 0.85));
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    background: white;
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary:hover {
    background: rgb(255, 255, 255);
    transform: translateY(-3px);
}

/* Map Container on Right Side */
.futuristic-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 0 40px rgba(0, 168, 232, 0.4),
        0 0 80px rgba(6, 182, 212, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    background: linear-gradient(to bottom right, #0a1f3d, #1a3b6c);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* SVG Map Styling */
.maldives-svg-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: 
        brightness(0.9) 
        contrast(1.2)
        drop-shadow(0 0 20px rgba(0, 168, 232, 0.6));
    z-index: 1;
}

/* Island Glow Effect - Applied to SVG paths */
.futuristic-map-container path {
    stroke: rgba(0, 168, 232, 0.9);
    stroke-width: 1.5;
    animation: islandGlowPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(0, 168, 232, 0.7));
}

@keyframes islandGlowPulse {
    0%, 100% {
        stroke-width: 1.5;
        filter: drop-shadow(0 0 8px rgba(0, 168, 232, 0.7));
    }
    50% {
        stroke-width: 2.5;
        filter: drop-shadow(0 0 15px rgba(0, 168, 232, 0.9));
    }
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: var(--dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Features */
.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #102c5b, #597c8a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Link for div */
.link-container {
    display: block;
    text-decoration: none;
    color: inherit;
}

.feature-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Tools Section */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.tool-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-left-color: var(--secondary);
}

.tool-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-card h3 i {
    color: var(--primary);
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.tool-card ul {
    margin-left: 1.5rem;
    color: var(--text-light);
}

.tool-card li {
    margin-bottom: 0.75rem;
}

.tool-card strong {
    color: var(--text);
}

/* API Section */
.api-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.api-grid .feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid var(--border);
    width: 100%;
    overflow: hidden;
}

.api-grid .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.api-grid .feature-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--dark);
    word-wrap: break-word;
}

.api-grid .feature-card h4 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--primary);
}

.api-grid .feature-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.api-grid .code-block {
    background: var(--dark);
    color: #10b981;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    font-size: 0.9rem;
    white-space: nowrap;
    max-width: 100%;
}

/* API Section Responsive Layout */
@media (min-width: 768px) {
    .api-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 2rem;
    }
    
    .api-grid .feature-card {
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .api-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .api-grid .feature-card {
        padding: 1.5rem;
    }
    
    .api-grid .feature-card h3 {
        font-size: 1.25rem;
    }
    
    .api-grid .feature-card h4 {
        font-size: 1rem;
    }
    
    .api-grid .code-block {
        padding: 1rem;
        font-size: 0.8rem;
        white-space: pre-wrap;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .api-grid .feature-card {
        padding: 1rem;
    }
    
    .api-grid .feature-card h3 {
        font-size: 1.125rem;
    }
    
    .api-grid .code-block {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .api-grid .feature-card p {
        font-size: 0.9rem;
    }
}

/* Ensure long URLs and code snippets break properly */
.api-grid .code-block,
.api-grid .feature-card a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Specific fix for the long base URL */
.api-grid .code-block:first-of-type {
    white-space: pre-wrap;
    word-break: break-all;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.contact-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
}

.contact-item i {
    color: var(--primary);
    font-size: 1.25rem;
    width: 30px;
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* Tabs Section */
.tabs-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    min-width: 160px;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tabs-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tab Content Styles */
.tab-pane h3 {
    color: var(--dark);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.tab-pane p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Tabs for Transliteration */
.standards-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.highlight-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.highlight-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.highlight-card h4 {
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.highlight-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.system-principles {
    margin: 3rem 0;
}

.system-principles h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.principle {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.principle h5 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.principle p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Consonant Tables */
.consonant-tables {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.consonant-table h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.thaana-text {
    font-family: 'Faruma', sans-serif;
    font-size: 1.5rem;
    direction: rtl;
    text-align: center;
}

.special-notes {
    margin-top: 3rem;
}

.special-notes h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.note {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.note h5 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-family: 'Faruma', sans-serif;
    direction: rtl;
}

.note p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Vowel System */
.vowel-system {
    margin: 2rem 0;
}

.vowel-table {
    margin-bottom: 3rem;
}

.vowel-table h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.vowel-features {
    margin-top: 3rem;
}

.vowel-features h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.feature i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature h5 {
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Examples Section */
.examples-section {
    margin: 2rem 0;
}

.island-examples,
.atoll-examples {
    margin-bottom: 3rem;
}

.examples-section h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.example-card {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.thaana-example {
    font-family: 'Faruma', sans-serif;
    font-size: 2rem;
    direction: rtl;
    margin-bottom: 1rem;
    color: var(--dark);
}

.roman-example {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.common-words {
    margin-top: 3rem;
}

.common-words h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.term {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    min-height: 60px;
}

.thaana-term {
    font-family: 'Faruma', sans-serif;
    font-size: 1.25rem;
    direction: rtl;
    min-width: 60px;
}

.roman-term {
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
}

.meaning {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Implementation Guidelines */
.implementation-guide {
    margin: 2rem 0;
}
        
.transliteration-container {
    margin: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.description {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    padding: 25px;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #1e5799;
    box-shadow: 0 0 0 2px rgba(30, 87, 153, 0.2);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

button {
    padding: 12px 25px;
    background-color: #1e5799;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #16457a;
}

button#clearBtn {
    background-color: #6c757d;
}

button#clearBtn:hover {
    background-color: #5a6268;
}

.output-group {
    margin-top: 25px;
}

.output-text {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    min-height: 150px;
    font-size: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.instructions {
    background-color: #e9f7fe;
    border-left: 4px solid #1e5799;
    padding: 15px;
    margin-top: 25px;
    border-radius: 0 6px 6px 0;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #1e5799;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

footer {
    /* text-align: center; */
    margin-top: 30px;
    padding: 15px;
    color: #6c757d;
    font-size: 14px;
    border-top: 1px solid #eee;
}

@media (max-width: 600px) {
    .transliteration-container {
        border-radius: 8px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .content {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

.rules-grid {
    display: grid;
    gap: 1.5rem;
}

.rule {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.rule-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rule-content h5 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.rule-content p {
    color: var(--text-light);
    margin-bottom: 0;
}

.special-cases {
    display: grid;
    gap: 1.5rem;
}

.case {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.case h5 {
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.case p {
    color: var(--text-light);
    margin-bottom: 0;
}

.qa-steps {
    display: grid;
    gap: 1.5rem;
}

.qa-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.qa-step .step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.qa-step .step-content h5 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.qa-step .step-content p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
}

tr:hover {
    background: var(--bg-light);
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
    
    .hero {
        padding: 80px 0;
        min-height: 600px;
    }
    
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
    
    .hero-content h2 {
        font-size: 3.5rem;
    }
    
    .futuristic-map-container {
        height: 500px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    .tabs-content {
        padding: 3rem;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-header h2 {
        font-size: 2.75rem;
    }
    
    nav {
        display: flex;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
}

@media (max-width: 767px) {
    nav {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content {
        padding-right: 0;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.125rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .futuristic-map-container {
        height: 400px;
    }
    
    .atoll-label-map {
        font-size: 9px;
        padding: 3px 10px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Responsive Tabs */
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: auto;
        text-align: left;
        border-bottom: 1px solid var(--border);
        border-left: 3px solid transparent;
    }
    
    .tab-button.active {
        border-left-color: var(--primary);
        border-bottom-color: var(--border);
    }
    
    .tabs-content {
        padding: 1.5rem;
    }
    
    .example-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .rule {
        flex-direction: column;
        text-align: center;
    }
    
    .qa-step {
        flex-direction: column;
        text-align: center;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    .standards-highlights {
        grid-template-columns: 1fr;
    }
    
    .consonant-tables {
        grid-template-columns: 1fr;
    }
    
    .principles-grid {
        grid-template-columns: 1fr;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Navigation */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    /* Table Responsiveness */
    .consonant-table, .vowel-table {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .futuristic-map-container {
        height: 300px;
    }
    
    .atoll-label-map {
        font-size: 8px;
        padding: 2px 8px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .tool-card,
    .contact-card {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card .number {
        font-size: 2rem;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .term {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .thaana-term {
        min-width: auto;
    }
    
    .roman-term {
        min-width: auto;
    }
    
    /* Typography for Small Screens */
    .feature-card h3, .tool-card h3 {
        font-size: 1.25rem;
    }
    
    /* Button Touch Targets */
    .hero-btn, .btn {
        min-height: 44px;
    }
    
    .tab-button {
        min-height: 44px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .futuristic-map-container {
        height: 250px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .feature-card, .tool-card, .contact-card {
        padding: 1rem;
    }
    
    .features-grid, .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure all images and embedded content are responsive */
img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
}

/* Ensure containers don't exceed viewport */
.container {
    width: 100%;
    max-width: 1280px;
}

/* Click animation styles */
@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}