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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    color: #555555;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: #f5f5f5f5;
    color: #333;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #555555;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    color: #555555;
}

main {
    padding: 30px;
}

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555555;
}

#urls {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

#urls:focus {
    outline: none;
    border-color: #555555;
}

.button-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    flex: 2;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #888;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    flex: 1;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.status-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.status-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.status-summary {
    margin-bottom: 20px;
}

.status-summary p {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.status-summary .success {
    background: #e8f5e9;
    color: #333;
}

.status-summary .error {
    background: #fee2e2;
    color: #333;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.result-index {
    font-weight: 600;
    color: #888888;
}

.result-url {
    flex: 1;
    font-size: 13px;
    color: #888888;
    word-break: break-all;
}

.result-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.result-badge.success {
    background: #ffffff;
    color: #667eea;
}

.result-badge.error {
    background: #ffffff;
    color: #666;
}

.download-link {
    display: inline-block;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: transform 0.2s;
}

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

.error-msg {
    color: #555555;
    font-size: 13px;
    margin: 0;
}

footer {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Language dropdown container - absolute positioned at top-right */
.language-dropdown {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Globe icon button */
.lang-toggle-btn {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 20px;
    padding: 0;
}

.lang-toggle-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.globe-icon {
    font-size: 20px;
}

/* Dropdown menu */
.lang-menu {
    position: absolute;
    top: 52px;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    max-height: 400px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Language menu items */
.lang-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #555555;
}

.lang-menu-item:last-child {
    border-bottom: none;
}

.lang-menu-item:hover {
    background: #f8f8f8;
}

.lang-menu-item.active {
    background: #f0f0f0;
    font-weight: 500;
}

.lang-flag {
    font-size: 18px;
    min-width: 24px;
}

.lang-name {
    flex: 1;
}

/* Scrollbar styling for dropdown */
.lang-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-menu::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.lang-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.lang-menu::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    main {
        padding: 20px;
    }

    .button-section {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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