/* Google Çeviri Tarzı Stiller */

body {
    font-family: 'Roboto', sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    padding: 16px 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 500;
    color: #202124; /* Default light mode color */
}

[data-theme="dark"] .logo-text {
    color: #ffffff; /* White color for dark mode */
}

.translate-section {
    margin: 24px 0;
}

.translate-container {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.language-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.language-selector {
    flex: 1;
}

.language-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    color: #202124;
    background: #fff;
    cursor: pointer;
}

.language-select:focus {
    outline: none;
    border-color: #1a73e8;
}

.swap-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #1a73e8;
    font-size: 18px;
    padding: 8px;
}

.swap-btn:hover {
    color: #1558b0;
}

.text-areas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.text-area-container {
    flex: 1;
    min-width: 300px;
}

.text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    background: #fff;
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

.text-input[readonly] {
    background: #f8f9fa;
}

.input-controls {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #5f6368;
    font-size: 18px;
    padding: 8px;
}

.icon-btn:hover {
    color: #202124;
}

.icon-btn:disabled {
    color: #dadce0;
    cursor: not-allowed;
}

.translate-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 16px auto;
    padding: 12px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.translate-btn:hover:not(:disabled) {
    background: #1558b0;
}

.translate-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.footer {
    text-align: center;
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
    color: #5f6368;
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.footer-link {
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Popup Stilleri */
.custom-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #e0e0e0;
}

.custom-popup.error {
    border-left-color: #d93025;
}

.custom-popup.warning {
    border-left-color: #f4b400;
}

.custom-popup.success {
    border-left-color: #0f9d58;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.popup-message {
    flex: 1;
    color: #202124;
    font-size: 14px;
    line-height: 1.5;
}

.popup-close {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    margin-left: 8px;
    line-height: 1;
}

.popup-close:hover {
    color: #202124;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Font Awesome ikonları için stil */
.fas {
    font-size: 20px;
}

.custom-popup.error .fas {
    color: #d93025;
}

.custom-popup.warning .fas {
    color: #f4b400;
}

.custom-popup.success .fas {
    color: #0f9d58;
}

/* Dark Mode Styles */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --accent-color: #4a6cf7;
}

[data-theme="dark"] {
    --primary-bg: #1a1a2e;
    --secondary-bg: #16213e;
    --text-color: #e6e6e6;
    --card-bg: #0f3460;
    --border-color: #2a3a5f;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --accent-color: #4cc9f0;
}

body {
    background: var(--primary-bg);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.header {
    background: var(--secondary-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.translation-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.translation-header {
    background: linear-gradient(135deg, #3a56c8, #2a42a0);
    color: white;
    border-bottom: 1px solid var(--border-color);
}

.translation-textarea {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.translation-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 247, 0.25);
}

.translation-footer {
    border-top: 1px solid var(--border-color);
}

.btn-translate {
    background: var(--accent-color);
    color: white;
}

.word-count {
    color: var(--text-color);
    opacity: 0.7;
}

/* Son Çeviriler */
#recentTranslations {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.recent-item {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid #1a73e8;
}

.recent-item:hover {
    background: #f1f3f4;
}

.recent-item.empty {
    color: #5f6368;
    font-style: italic;
    text-align: center;
    padding: 15px;
    background: transparent;
    border-left: none;
    cursor: default;
}

.recent-source {
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-translation {
    color: #5f6368;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .text-areas {
        flex-direction: column;
    }

    .language-controls {
        flex-direction: column;
        gap: 8px;
    }

    .language-selector {
        width: 100%;
    }

    .translate-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .text-input {
        font-size: 14px;
        padding: 10px;
    }

    .language-select {
        font-size: 14px;
    }

    .translate-btn {
        font-size: 14px;
    }
}