@charset "UTF-8";
/* GetCodeMail UI - V3.0 Final */

/* ===== VARIABLES ===== */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.12);
    --bg: #f0f2f8;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
    --success: #10b981;
    --error: #ef4444;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ===== HEADER ===== */
.main-header {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    margin-right: auto;
}

/* Contact bubbles - desktop: flex:1, centered */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.contact-info a {
    text-decoration: none;
}

.contact-info span {
    display: inline-block;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    transition: var(--transition);
}

.contact-info span:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Radio checked states */
.toggle-option input[value="renew"]:checked + .toggle-content {
    color: var(--primary);
}
.toggle-option input[value="renew"]:checked {
    border-color: var(--primary);
    background: var(--surface);
}
.toggle-option input[value="renew"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
.updated-combo-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.token-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.full-combo-row {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
}
.combo-box-text {
    font-weight: 700 !important;
    color: #166534 !important;
    background: #dcfce7 !important;
    letter-spacing: 0.02em;
}
.btn-success {
    background: #10b981 !important;
    color: white !important;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}
.btn-success:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.copy-full-btn {
    margin-left: auto;
}
.token-label {
    font-weight: 700;
    color: #475569;
}
.token-value {
    font-family: 'JetBrains Mono', monospace;
    color: #1e293b;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-copy-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-copy-small:hover { opacity: 0.9; transform: translateY(-1px); }

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

/* Header right group: API docs + language */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.api-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 700;
    transition: var(--transition);
    white-space: nowrap;
}

.api-link:hover {
    color: var(--primary);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.lang-btn img {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

.lang-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Hamburger - hidden on desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 17px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== PARTNERS ===== */
.partners-section {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.banner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.banner-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1.1rem;
    transition: var(--transition);
}

.banner-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.banner-item img {
    height: 24px;
    object-fit: contain;
}

.banner-item span {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== INPUT CARD ===== */
.input-section {
    margin-bottom: 1.5rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-body {
    padding: 1.75rem 2rem;
}

/* Stats bar */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.stat-item {
    text-align: center;
}

.stat-item>span:first-child {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-item>span:last-child {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
}

.stat-item.success>span:last-child {
    color: var(--success);
}

.stat-item.error>span:last-child {
    color: var(--error);
}

.stat-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-all {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-all:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.progress-wrapper {
    grid-column: 1 / -1;
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 99px;
    transition: width 0.3s ease;
}

/* Textarea */
textarea#token-input {
    width: 100%;
    height: 150px;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface2);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
    color: var(--text);
    outline: none;
    display: block;
}

textarea#token-input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Method radio toggles */
.method-toggles {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin: 1.25rem 0;
}

.toggle-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
}

.toggle-option:hover {
    color: var(--text);
}

.toggle-option input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

.toggle-option input[type="radio"]:checked {
    border-color: var(--primary);
}

.toggle-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
}

.toggle-content {
    line-height: 1;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 0.75rem;
}

.btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.btn-renew {
    background: #22c55e;
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
}
.btn-primary.btn-renew:hover {
    background: #16a34a;
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--surface2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    flex: none;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ===== RESULTS ===== */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-result {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-copy-header {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-copy-header:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    padding: 0.75rem 1rem;
    background: var(--surface2);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--surface2);
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem !important;
}

.error-text {
    color: var(--error);
    text-align: center;
    padding: 1rem !important;
}

.copy-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-badge:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h4 {
    font-size: 1rem;
    font-weight: 800;
}

.close-modal {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--error);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.content-body img {
    max-width: 100%;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--text);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem 0.6rem;
    }

    /* Header mobile layout */
    .main-header {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.3rem;
        margin-right: 0;
    }

    /* Show hamburger, hide contact on mobile */
    .menu-toggle {
        display: flex;
    }

    .contact-info {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        box-shadow: var(--shadow);
        z-index: 1000;
        flex: none;
        justify-content: flex-start;
    }

    .contact-info.active {
        display: flex;
    }

    .contact-info span {
        width: 100%;
        text-align: center;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    /* Hide API link on mobile */
    .api-link {
        display: none;
    }

    /* Partner grid - compact icons */
    .banner-grid {
        gap: 0.4rem;
    }

    .banner-item {
        padding: 0.5rem 0.6rem;
    }

    .banner-item span {
        display: none;
    }

    /* Card padding */
    .card-header {
        padding: 1.25rem 1rem;
    }

    .card-body {
        padding: 1.25rem 1rem;
    }

    /* Stack buttons */
    .button-group {
        flex-direction: column;
    }

    .btn {
        flex: none;
        width: 100%;
    }

    /* Progress spans full width */
    .stats-container {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Table scroll */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 400px) {
    .contact-info {
        flex-direction: column;
    }

    .lang-btn span {
        display: none;
    }

    .lang-switcher {
        padding: 2px;
    }
}