/* --- 1. CSS VARIABLES & RESET --- */
:root {
    --primary-color: #007AFF;
    --primary-gradient: linear-gradient(135deg, #007AFF 0%, #005ecb 100%);
    --brand-gradient: linear-gradient(135deg, #00C6FB 0%, #005BEA 100%);
    --secondary-color: #FF9500;
    --bg-color: #F5F7FA;
    --card-bg: #FFFFFF;
    --text-main: #1D1D1F;
    --text-secondary: #86868b;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- HEADER --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 0;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; text-decoration: none; gap: 12px; }
.logo-img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 91, 234, 0.2); object-fit: cover; }
.logo-text {
    font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
    background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: #005BEA;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.nav-links a:hover { color: var(--primary-color); }

.btn-download { 
    background: var(--text-main); color: white !important; 
    padding: 10px 20px; border-radius: 30px; font-size: 14px; font-weight: 600; 
}
.btn-download:hover { opacity: 0.9; transform: translateY(-1px); }

/* --- HERO GRID LAYOUT --- */
.hero-section { padding: 30px 0 20px; text-align: center; }
.ad-banner-top { 
    width: 100%; max-width: 728px; height: 90px; background: #EAEAEA; 
    margin: 0 auto 30px; display: flex; align-items: center; justify-content: center; 
    color: #999; border-radius: 8px; border: 1px dashed #ccc; 
}

.hero-grid {
    display: flex; justify-content: center; align-items: flex-start; 
    gap: 30px; margin-bottom: 40px;
}

/* --- SIDE PANELS --- */
.side-panel {
    flex: 1; max-width: 300px; background: transparent; padding-top: 40px;
    opacity: 0; animation: fadeInSide 0.8s ease forwards;
}
.side-panel.left-panel { text-align: right; animation-delay: 0.2s; }
.side-panel.right-panel { text-align: left; animation-delay: 0.4s; }

@keyframes fadeInSide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.panel-content h3 { font-size: 20px; font-weight: 800; margin: 15px 0 10px; color: var(--text-main); }
.panel-content p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }

.icon-box {
    width: 60px; height: 60px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.receiver-icon { background: #e3f2fd; color: #2196f3; }
.sender-icon { background: #e8f5e9; color: #4caf50; }

.benefit-list { margin-bottom: 25px; }
.benefit-list li {
    font-size: 13px; color: #555; margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
    justify-content: flex-end; /* Panel trái */
}
.right-panel .benefit-list li { justify-content: flex-start; } /* Panel phải */
.benefit-list li i { color: var(--primary-color); }

.cta-box .small-text { margin-bottom: 5px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: #aaa; }
.text-link { color: var(--primary-color); font-weight: 700; font-size: 15px; transition: 0.2s; }
.text-link:hover { text-decoration: underline; gap: 5px; }

.app-store-btn {
    display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff !important;
    padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: 0.2s;
}
.app-store-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* --- TRANSFER CARD --- */
.transfer-card {
    background: var(--card-bg); border-radius: var(--border-radius); box-shadow: var(--shadow);
    flex: 0 0 500px; width: 500px; margin: 0; z-index: 2; overflow: hidden; position: relative; min-height: 400px;
}

.card-tabs { display: flex; background: #f9f9f9; border-bottom: 1px solid #eee; }
.tab-btn { 
    flex: 1; padding: 20px; border: none; background: transparent; font-size: 16px; 
    font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: var(--transition); position: relative; 
}
.tab-btn.active { color: var(--primary-color); background: #fff; }
.tab-btn.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--primary-color); }

.card-body { padding: 40px 30px; text-align: left; }
.view-content { display: none; animation: fadeIn 0.4s ease; }
.view-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h2 { font-size: 22px; margin-bottom: 5px; text-align: center; }
.subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 25px; text-align: center; }

/* INPUTS & BUTTONS */
.input-key-wrapper { margin-bottom: 25px; }
.input-key {
    width: 100%; padding: 15px; font-size: 32px; font-family: 'Courier New', monospace; text-align: center;
    border: 2px solid #E5E5EA; border-radius: 12px; letter-spacing: 5px; outline: none; transition: var(--transition); background: #FAFAFA;
}
.input-key:focus { border-color: var(--primary-color); background: #fff; box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1); }

.btn-action {
    width: 100%; padding: 16px; border: none; border-radius: 12px; background: var(--primary-gradient);
    color: white; font-size: 18px; font-weight: 700; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3); display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-action:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4); }
.btn-action:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-success { background: linear-gradient(135deg, #34c759 0%, #2a9d47 100%); box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3); }

.drop-zone {
    border: 2px dashed #D1D1D6; border-radius: 12px; padding: 40px 20px; background: #FAFAFA;
    cursor: pointer; transition: var(--transition); text-align: center; display: block; margin-bottom: 20px;
}
.drop-zone:hover { border-color: var(--primary-color); background: #F0F8FF; }
.drop-zone i { font-size: 48px; color: var(--text-secondary); margin-bottom: 15px; }
.file-label-text { font-size: 13px; color: var(--primary-color); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hidden { display: none !important; }
.status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.badge-purple { background: #E9D8FD; color: #6B46C1; }
.badge-blue { background: #BEE3F8; color: #2B6CB0; }
.btn-icon { background: none; border: none; font-size: 18px; color: #999; cursor: pointer; transition: 0.2s; }
.btn-icon:hover { color: #ff4757; }

/* ROOM CODE BOX */
.room-code-box { text-align: center; margin: 30px 0; background: #f8f9fa; padding: 30px; border-radius: 16px; }
.room-code-box p { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }

.code-wrapper { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 10px; }
.room-code-box h1 { font-size: 48px; color: var(--text-main); letter-spacing: 4px; margin: 0; font-family: monospace; font-weight: 800; }

/* [MỚI] Điều chỉnh font size code nhỏ lại */
.room-code-box h1.code-text { font-size: 38px !important; letter-spacing: 2px; }

.btn-copy-inline {
    background: white; border: 1px solid #e0e0e0; width: 50px; height: 50px; border-radius: 12px;
    color: var(--primary-color); font-size: 20px; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn-copy-inline:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

.expire-text { 
    color: #e53e3e !important; font-weight: 600; margin-top: 20px !important; 
    font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 5px; 
}

.progress-container { margin-top: 20px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; color: var(--text-secondary); }
progress { width: 100%; height: 10px; border-radius: 5px; appearance: none; }
progress::-webkit-progress-bar { background-color: #eee; border-radius: 5px; }
progress::-webkit-progress-value { background: var(--primary-gradient); border-radius: 5px; transition: width 0.3s; }

.download-list { margin-top: 20px; max-height: 250px; overflow-y: auto; }
.download-item { 
    display: flex; align-items: center; gap: 10px; padding: 12px; background: #f0f9ff; 
    border: 1px solid #bae6fd; border-radius: 8px; margin-bottom: 8px; color: #0284c7; font-weight: 500; font-size: 14px;
}
.download-item:hover { background: #e0f2fe; }

/* FEATURES BAR */
.features-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px;
    background: #fff; padding: 30px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.02);
}
.feature-item { display: flex; gap: 15px; align-items: flex-start; }
.feat-icon {
    width: 40px; height: 40px; background: #f5f7fa; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-size: 18px; flex-shrink: 0;
}
.feat-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text-main); }
.feat-text p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* ECOSYSTEM */
.ecosystem-section { padding: 60px 0; background-color: #F5F5F7; }
.ecosystem-header { text-align: center; margin-bottom: 50px; }
.ecosystem-header h2 {
    font-size: 36px; font-weight: 800; letter-spacing: -0.5px;
    background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; color: #005BEA; margin-bottom: 10px;
}
.ecosystem-header p { font-size: 18px; color: #86868b; max-width: 600px; margin: 0 auto; font-weight: 400; }
.ecosystem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 40px; max-width: 1000px; margin: 0 auto; }
.platform-col h3 {
    font-size: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
    color: #86868b; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid #e5e5e5; padding-bottom: 10px;
}
.app-row {
    display: flex; align-items: center; padding: 20px; background: #FFFFFF; border-radius: 18px;
    margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); transition: all 0.3s ease; border: 1px solid rgba(0,0,0,0.02);
}
.app-row:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); }
.app-icon { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background-color: #EEEEEE; border: 1px solid rgba(0,0,0,0.05); flex-shrink: 0; }
.app-info { flex: 1; padding: 0 15px; overflow: hidden; }
.app-info h4 { font-size: 17px; font-weight: 700; color: #1D1D1F; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-info p { font-size: 13px; color: #86868b; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-get {
    background: #F0F0F8; color: #007AFF; font-size: 14px; font-weight: 700; padding: 8px 24px;
    border-radius: 20px; text-transform: uppercase; transition: all 0.2s; white-space: nowrap; text-decoration: none;
}
.btn-get:hover { background: #007AFF; color: #fff; box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3); }
.ad-banner-bottom { 
    margin-top: 40px; display: flex; justify-content: center; width: 300px; height: 250px;
    background: #EAEAEA; margin-left: auto; margin-right: auto; align-items: center; border-radius: 8px; border: 1px dashed #ccc; color: #999; 
}

/* FOOTER */
footer { background: #fff; padding: 40px 0; border-top: 1px solid #eee; text-align: center; color: var(--text-secondary); font-size: 14px; }
.footer-links { margin-bottom: 20px; }
.footer-links a { margin: 0 15px; }
.footer-links a:hover { color: var(--primary-color); }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .side-panel { display: none; }
    .hero-grid { display: block; }
    .transfer-card { width: 100%; max-width: 600px; margin: 0 auto; flex: none; }
    .features-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .transfer-card { margin: 0 10px; max-width: 100%; }
    .input-key { font-size: 24px; letter-spacing: 2px; }
    .room-code-box h1 { font-size: 32px; }
    .room-code-box h1.code-text { font-size: 28px !important; }
    .ecosystem-grid { grid-template-columns: 1fr; padding: 0 15px; }
    .app-icon { width: 60px; height: 60px; }
    .features-bar { grid-template-columns: 1fr; }
}