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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    min-height: 100vh;
    color: #1f2a37;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 32px;
    color: inherit;
}

.header-content h1 {
    font-size: 2.75rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.subtitle {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 18px;
}

.version-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.version {
    background: #e2e8f0;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f4c81;
}

.features {
    font-size: 0.9rem;
    color: #64748b;
}

.cheatsheet-link {
    background: #0f4c81;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cheatsheet-link:hover {
    background: #155b9a;
    border-color: #0f4c81;
    text-decoration: none;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 11px 22px;
    border: 1px solid #d1d9e0;
    border-radius: 999px;
    background: #f0f4f8;
    color: #0f4c81;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 76, 129, 0.08);
}

.nav-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: #0f4c81;
    color: #ffffff;
    border-color: #0f4c81;
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.18);
}

/* Content Sections */
.content-section {
    display: none;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 18px 40px rgba(15, 76, 129, 0.08);
    margin-bottom: 32px;
}

.content-section.active {
    display: block;
}

/* Translator Section */
.translator-container {
    max-width: 1000px;
    margin: 0 auto;
}

.input-section, .output-section, .reverse-section {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

textarea, .output-area {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

textarea:focus, .output-area:focus {
    outline: none;
    border-color: #0f4c81;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.08);
}

.output-area {
    background: #f6f8fa;
    min-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-area.reverse {
    background: #eef4fb;
    border-color: #d7e3f1;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.control-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn.primary {
    background: #0f4c81;
    color: #ffffff;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.28);
    background: #155b9a;
}

.btn.secondary {
    background: #ffffff;
    color: #3f4c5d;
    border: 1px solid #d1d9e0;
    box-shadow: 0 1px 2px rgba(15, 76, 129, 0.04);
}

.btn.secondary:hover {
    background: #f2f5f8;
    border-color: #0f4c81;
    color: #0f4c81;
}

.toggle-container {
    margin-left: auto;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.toggle input {
    display: none;
}

.slider {
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.slider:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

.toggle input:checked + .slider {
    background: #0f4c81;
}

.toggle input:checked + .slider:before {
    transform: translateX(26px);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #ffffff;
    padding: 26px;
    border-radius: 12px;
    border-left: 4px solid #0f4c81;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 76, 129, 0.12);
}

.feature-card h3 {
    color: #0f4c81;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.feature-card p {
    margin-bottom: 15px;
    color: #4b5563;
}

.feature-details {
    background: #f6f8fa;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #dde5ed;
}

.feature-details ul {
    list-style: none;
    padding: 0;
}

.feature-details li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.feature-details li:last-child {
    border-bottom: none;
}

/* Learning Section */
.learning-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0f4c81;
    font-size: 1.9rem;
}

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

.learning-card {
    background: #ffffff;
    padding: 26px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.06);
}

.learning-card h3 {
    color: #0f4c81;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.char-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.char-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5ecf3;
}

.latin {
    font-weight: 600;
    color: #333;
    min-width: 30px;
}

.arrow {
    color: #0f4c81;
    font-weight: bold;
}

.gokturk {
    font-size: 1.2rem;
    color: #e74c3c;
    font-weight: bold;
    min-width: 40px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* PUA character fallback styling */
.gokturk:empty::before {
    content: "[PUA]";
    color: #999;
    font-style: italic;
    font-size: 0.8rem;
}

.pua-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #856404;
}

/* IME Status */
.ime-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-indicator.active {
    background: #28a745;
    color: white;
}

.status-indicator.inactive {
    background: #dc3545;
    color: white;
}

/* Font Selector */
.font-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.font-selector select {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
}

/* Character Mapping Tool */
.char-mapping-tool {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    margin-bottom: 15px;
}

.mapping-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mapping-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.mapping-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

#mapping-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
}

.latin-char, .gokturk-char {
    font-weight: bold;
    min-width: 40px;
}

/* Game Integration */
.game-integration {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.game-integration h4 {
    margin-bottom: 15px;
    color: #0f4c81;
}

.game-demo {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.game-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.game-label {
    font-weight: 600;
    color: #555;
}

#game-text-display {
    font-weight: bold;
    color: #0f4c81;
}

.game-controls {
    display: flex;
    gap: 10px;
}

.desc {
    color: #666;
    font-size: 0.9rem;
    margin-left: auto;
}

.sample-sentences {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sample {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.latin-text {
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.gokturk-text {
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: bold;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: block;
    padding: 12px 20px;
    background: #0f4c81;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.download-btn:hover {
    background: #155b9a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.24);
}

/* Pilot Project Section */
.pilot-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0f4c81;
    font-size: 1.9rem;
}

.pilot-overview {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #666;
}

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

.pilot-card {
    background: #ffffff;
    padding: 26px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 76, 129, 0.08);
}

.pilot-card h3 {
    color: #0f4c81;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.pilot-card ul {
    list-style: none;
    padding: 0;
}

.pilot-card li {
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.pilot-card li:last-child {
    border-bottom: none;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.month {
    font-weight: 600;
    color: #0f4c81;
}

.task {
    color: #666;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.metric {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f4c81;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
}

.pilot-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pilot-link {
    display: block;
    padding: 12px 20px;
    background: #0f4c81;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pilot-link:hover {
    background: #155b9a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.24);
}

/* About Section */
.about-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0f4c81;
    font-size: 1.9rem;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.about-section {
    background: #ffffff;
    padding: 26px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 76, 129, 0.06);
}

.about-section h3 {
    color: #0f4c81;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.about-section p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.about-section ul {
    list-style: none;
    padding: 0;
}

.about-section li {
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.about-section li:last-child {
    border-bottom: none;
}

.doc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.doc-links a {
    display: block;
    padding: 10px 15px;
    background: #0f4c81;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.doc-links a:hover {
    background: #155b9a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.2);
}

/* Footer */
footer {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.footer-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.characters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.char-group {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0f4c81;
}

.char-group strong {
    color: #0f4c81;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-links a {
    color: #0f4c81;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: #155b9a;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .toggle-container {
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }
    
    .features-grid,
    .learning-grid,
    .pilot-grid,
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .characters {
        grid-template-columns: 1fr;
    }
    
    .metrics {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .doc-links {
        grid-template-columns: 1fr;
    }
}

/* Copy feedback */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.copy-feedback.show {
    transform: translateX(0);
}

.copy-feedback.error {
    background: #dc3545;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #0f4c81;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #0f4c81;
}

.modal-body {
    padding: 0;
}

#pdf-iframe {
    border: none;
    border-radius: 0 0 10px 10px;
} 