/* GTranslate CSS */
.goog-te-banner-frame.skiptranslate { display: none !important; } 
body { top: 0px !important; }
.goog-te-menu-frame { max-width:100% !important; }
#google_translate_element { display: none; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2e5cb4;
    --primary-dark: #1d5cb4;
    --secondary: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg-light: #f1f5f9;
    --marquee-bg: #fef3c7;
    --marquee-text: #92400e;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--text);
}

/* Top Bar */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-selector i {
    color: white;
}

.language-dropdown {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    min-width: 150px;
}

.language-dropdown:focus {
    outline: none;
    border-color: var(--primary);
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.logo-container {
    text-align: center;
}

.logo {
    height: 40px;
    width: auto;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.card-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-header p {
    opacity: 0.9;
    font-size: 1rem;
    margin-bottom: 0;
}

.card-body {
    padding: 30px;
    background: var(--secondary);
}

/* Announcement Marquee */
.announcement-section {
    margin-bottom: 25px;
}

.announcement-bar {
    background: linear-gradient(90deg, #fef3c7, #fde68a, #fcd34d, #fbbf24, #f59e0b, #f59e0b, #fbbf24, #fcd34d, #fde68a, #fef3c7);
    color: var(--marquee-text);
    padding: 12px 0;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 2px solid #fbbf24;
    position: relative;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
}

.marquee-content i {
    color: #d97706;
    font-size: 1.1rem;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Connection Method Selector */
.connection-method {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--border);
}

.method-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.method-btn {
    background: white;
    border: 2px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.method-info {
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background: white;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 92, 180, 0.1);
    outline: none;
}

.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 92, 180, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.email-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.email-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.email-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.email-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.email-address {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.email-badge {
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.method-badge {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.mail-table {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: var(--secondary);
}

th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tr:hover {
    background: #f8fafc;
}

.message-row {
    transition: all 0.3s ease;
}

.message-row.expanded {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
}

.stt-cell {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
}

.from-cell {
    min-width: 200px;
}

.from-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 12px;
    float: left;
}

.from-info {
    overflow: hidden;
}

.from-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.from-email {
    color: var(--text-light);
    font-size: 0.8rem;
}

.time-cell {
    width: 150px;
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

.content-cell {
    min-width: 300px;
}

.subject {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1rem;
}

.content-preview {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.btn-view {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view:hover {
    background: var(--primary);
    color: white;
}

.message-details {
    margin-top: 15px;
    display: none;
}

.message-details.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.html-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.html-content iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 8px;
}

.html-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
}

.error-message {
    background: var(--error);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.no-messages i {
    font-size: 2rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-container {
        margin: 15px auto;
        padding: 0 15px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-header h1 {
        font-size: 1.8rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .method-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .method-btn {
        justify-content: center;
    }
    
    .announcement-bar {
        padding: 10px 0;
        font-size: 0.85rem;
    }
    
    .marquee-content {
        gap: 20px;
    }
    
    .language-dropdown {
        min-width: 120px;
        font-size: 0.8rem;
    }
    
    .email-header {
        padding: 15px 20px;
    }
    
    .email-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .email-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .email-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    th, td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .stt-cell {
        width: 50px;
    }
    
    .from-cell, .time-cell {
        min-width: auto;
    }
    
    .from-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
        margin-right: 8px;
    }
    
    .subject {
        font-size: 0.9rem;
    }
    
    .content-preview {
        font-size: 0.8rem;
    }
    
    .html-content {
        max-height: 300px;
        padding: 10px;
    }
    
    .html-content iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .announcement-bar {
        font-size: 0.8rem;
        padding: 8px 0;
    }
    
    .marquee-content {
        gap: 15px;
    }
    
    .language-dropdown {
        min-width: 100px;
        font-size: 0.75rem;
    }
    
    th {
        font-size: 0.7rem;
        padding: 10px 6px;
    }
    
    td {
        padding: 10px 6px;
    }
    
    .from-avatar {
        display: none;
    }
    
    .top-bar-content {
        justify-content: center;
    }
}
/* Thêm vào file style.css */
.method-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
}

.method-btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}