/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7fe;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background:
        radial-gradient(circle at 18% 10%, rgba(121, 240, 198, 0.18), transparent 30%),
        linear-gradient(135deg, #263ca4, #315fcb);
    color: white;
    text-align: center;
    padding: 1.75rem 1rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: white;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.brand:hover {
    transform: translateY(-2px);
}

.brand:focus-visible {
    outline: 3px solid #79f0c6;
    outline-offset: 6px;
    border-radius: 10px;
}

.brand-mark {
    width: 3.35rem;
    height: 3.35rem;
    display: grid;
    place-items: center;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(18, 32, 101, 0.25);
    backdrop-filter: blur(8px);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 0.28em;
    font-size: clamp(1.65rem, 5vw, 2.25rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1;
}

.brand-name strong {
    color: #79f0c6;
    font-weight: 800;
}

.site-header p {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
}

/* Container */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Navigation Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
}

.tab-btn:hover {
    background-color: #f3f4f6;
}

.tab-btn.active {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.tab-btn.translate-tab {
    border-color: #c4b5fd;
}

/* Tool Section Card */
.tool-card {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tool-card.active-tab {
    display: block;
}

.tool-card h2 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* File Upload Box (Drop Zone) */
.drop-zone {
    border: 2px dashed #cbd5e1;
    padding: 2.5rem 1rem;
    border-radius: 8px;
    background-color: #fafafa;
    cursor: pointer;
    position: relative;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.drop-zone:hover {
    border-color: #4f46e5;
    background-color: #f8fafc;
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Action Button */
.action-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #059669;
}

.action-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* Output Box */
.output-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    text-align: center;
}

.download-link {
    display: inline-block;
    margin-top: 1rem;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.download-link:hover {
    background-color: #1d4ed8;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #ffffff;
    color: #9ca3af;
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
}
/* Edit Tool Inputs */
.edit-options {
    margin-bottom: 1.5rem;
    text-align: left;
}

.edit-options label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.edit-options input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

/* Translation Tool */
.translation-card {
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(79, 70, 229, 0.12);
}

.translation-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    top: -150px;
    right: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 240, 198, 0.26), transparent 68%);
    pointer-events: none;
}

.translation-heading {
    position: relative;
}

.translation-badge {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.translate-drop-zone {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    background: linear-gradient(145deg, #fafaff, #f5fdf9);
}

.translate-drop-zone p {
    margin-bottom: 0;
    color: #374151;
    font-weight: 700;
}

.translate-drop-zone small {
    color: #81889a;
}

.upload-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 14px;
    background: #4f46e5;
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 9px 20px rgba(79, 70, 229, 0.25);
}

.language-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    text-align: left;
}

.field-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 700;
}

.field-group input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d8dbea;
    border-radius: 9px;
    background: #fff;
    color: #1f2937;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.13);
}

.language-swap {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: 0.2rem;
    place-items: center;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 800;
}

.translate-action {
    min-width: min(100%, 280px);
    background: linear-gradient(135deg, #4f46e5, #315fcb);
    box-shadow: 0 10px 22px rgba(49, 95, 203, 0.24);
}

.translate-action:hover {
    background: linear-gradient(135deg, #4338ca, #264da9);
}

.translation-status {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #f5f7ff;
    text-align: left;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    color: #3f4770;
    font-size: 0.88rem;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e0e7ff;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #10b981);
    transition: width 0.25s ease;
}

.inline-error {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #b42318 !important;
    font-size: 0.9rem;
}

.privacy-note {
    margin: 1rem 0 0 !important;
    color: #7c8496 !important;
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .brand {
        gap: 0.65rem;
    }

    .brand-mark {
        width: 2.9rem;
        height: 2.9rem;
        border-radius: 13px;
    }

    .brand-name {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.05rem;
        letter-spacing: -0.035em;
    }

    .tool-card {
        padding: 1.35rem;
    }

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

    .language-swap {
        margin: -0.15rem auto;
        transform: rotate(90deg);
    }
}
