/* ========== XANH NƯỚC BIỂN + LIGHT THEME ========== */
:root {
    --primary: #0099ff;
    --primary-dark: #0077cc;
    --primary-light: #33adff;
    --primary-bg: #e8f4ff;
    --bg-white: #ffffff;
    --bg-light: #f5f7fa;
    --text-dark: #1a2c3e;
    --text-muted: #6c7a89;
    --border-light: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-primary: 0 4px 12px rgba(0,153,255,0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fa 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== MOBILE MENU ========== */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ========== HEADER ========== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

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

.logo-img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    border-radius: 12px;
}

.nav-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.search-box input {
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-dark);
    width: 220px;
    outline: none;
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    padding: 10px 16px;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    padding: 6px 12px 6px 6px;
    border-radius: 40px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden;
    color: white;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* ========== HERO SECTION ========== */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e8f4ff 0%, #d4e8ff 100%);
    border-radius: 28px;
    padding: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-content {
    flex: 1;
    min-width: 280px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    background: white;
    padding: 20px 30px;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    min-width: 100px;
}

.stat span {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    display: block;
    font-family: 'Orbitron', monospace;
}

.stat p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-outline {
    background: white;
    border: 2px solid var(--primary);
    padding: 10px 26px;
    border-radius: 40px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
}

.btn-small {
    background: var(--primary);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========== SOCIAL SECTION ========== */
.social-section {
    margin-bottom: 48px;
}

.social-section h2 {
    color: var(--text-dark);
    margin-bottom: 28px;
    font-size: 28px;
    font-weight: 700;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.social-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.social-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.social-card i {
    font-size: 48px;
    margin-bottom: 16px;
}

.social-card .fa-discord { color: #5865F2; }
.social-card .fa-youtube { color: #FF0000; }
.social-card .fa-zalo { color: #0068FF; }
.social-card .fa-tiktok { color: #000000; }

.social-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.social-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.social-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ========== HASHTAGS ========== */
.hashtags-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 700;
}

.hashtag-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hashtag-item {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-weight: 500;
}

.hashtag-item:hover, .hashtag-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.hashtag-item small {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 4px;
}

/* ========== SCRIPT GRID ========== */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.script-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.script-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.script-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-light);
}

.script-card-content {
    padding: 20px;
}

.script-card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.script-card .hashtags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.script-card .hashtag {
    background: var(--primary-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
}

.script-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.script-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.filter-bar input {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.filter-bar select {
    padding: 12px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== ADD SCRIPT BUTTON ========== */
.add-script-btn-container {
    margin-bottom: 32px;
    text-align: center;
}

.script-form-container {
    margin-bottom: 48px;
    animation: slideDown 0.3s ease;
}

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

.form-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.form-card h3 {
    color: var(--text-dark);
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.1);
}

.hashtag-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.hashtag-input-group input {
    flex: 1;
}

/* ========== IMAGE UPLOAD ========== */
.image-upload-area, .file-upload-area {
    background: var(--bg-light);
    border: 2px dashed var(--border-light);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area:hover, .file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.image-upload-area i, .file-upload-area i {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
}

.image-upload-area p, .file-upload-area p {
    color: var(--text-muted);
    font-size: 14px;
}

.image-preview {
    margin-top: 16px;
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-image:hover {
    transform: scale(1.1);
}

.file-name {
    margin-top: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ========== PROFILE PAGE ========== */
.login-prompt {
    text-align: center;
    padding: 60px;
    background: var(--bg-white);
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.login-prompt i {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: 20px;
}

.login-prompt h3 {
    margin-bottom: 12px;
    font-size: 24px;
}

.login-prompt p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.profile-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
    color: white;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-form .form-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.profile-form .form-group input, 
.profile-form .form-group textarea {
    flex: 1;
}

.profile-stats {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 24px 0;
    flex-wrap: wrap;
}

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

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

.profile-actions {
    text-align: center;
    margin-top: 24px;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 28px;
    border: 1px solid var(--border-light);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.modal-body {
    padding: 24px;
}

.script-image-preview {
    text-align: center;
    margin-bottom: 24px;
}

.script-image-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.script-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hashtags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hashtags span {
    background: var(--primary-bg);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.author, .stats {
    color: var(--text-muted);
    font-size: 13px;
}

.script-description, .script-code {
    margin-bottom: 24px;
}

.script-description h4, .script-code h4 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-copy {
    background: var(--primary);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--primary-dark);
}

#modalCode {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    border: 1px solid var(--border-light);
    max-height: 280px;
    overflow-y: auto;
    color: var(--text-dark);
}

.script-attachment {
    margin-bottom: 24px;
}

.script-attachment h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.script-attachment a {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.script-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    .nav-menu {
        justify-content: center;
        order: 2;
    }
    .header-actions {
        order: 1;
        justify-content: center;
    }
    .hero-title {
        font-size: 36px;
    }
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    .header {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        transition: right 0.3s ease;
        z-index: 1000;
        border-radius: 0;
    }
    .header.open {
        right: 0;
        left: auto;
    }
    .header-container {
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
        padding: 70px 20px 20px;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    .nav-link {
        padding: 12px 0;
    }
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    .search-box {
        width: 100%;
    }
    .search-box input {
        width: 100%;
    }
    .main-content {
        padding: 20px 16px;
    }
    .hero-section {
        padding: 32px 24px;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons button {
        width: 100%;
        justify-content: center;
    }
    .social-grid {
        grid-template-columns: 1fr;
    }
    .scripts-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .filter-bar select {
        width: 100%;
    }
    .form-actions {
        flex-direction: column;
    }
    .profile-form .form-group {
        flex-direction: column;
    }
    .profile-form .form-group button {
        width: 100%;
    }
    .profile-stats {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }
    .stat span {
        font-size: 28px;
    }
    .stat {
        padding: 16px 24px;
    }
    .script-card-image {
        height: 140px;
    }
    .modal-content {
        margin: 12px;
    }
    .modal-header h2 {
        font-size: 18px;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========== MY SCRIPTS SECTION ========== */
.my-scripts-section, .favorites-section, .activity-section, .social-section-form, .password-section {
    margin-top: 30px;
    background: #f5f7fa;
    border-radius: 16px;
    padding: 20px;
}

.my-scripts-section h3, .favorites-section h3, .activity-section h3, .social-section-form h3, .password-section h3 {
    color: #0099ff;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.my-script-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid #e1e8ed;
}

.my-script-info h4 {
    color: #0099ff;
    margin-bottom: 5px;
}

.my-script-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c7a89;
}

.my-script-actions {
    display: flex;
    gap: 10px;
}

.edit-script {
    background: #0099ff;
    color: white;
}

.delete-script {
    background: #dc2626;
    color: white;
}

/* Favorites */
.favorite-script-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e1e8ed;
}

.favorite-script-item:hover {
    background: #e8f4ff;
    transform: translateX(5px);
}

.favorite-script-item h4 {
    color: #0099ff;
    margin-bottom: 5px;
}

.favorite-script-item p {
    color: #6c7a89;
    font-size: 13px;
}

.unfavorite-btn {
    margin-top: 10px;
    background: none;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

.unfavorite-btn:hover {
    background: #dc2626;
    color: white;
}

/* Activity Log */
.activity-item {
    background: white;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border: 1px solid #e1e8ed;
}

.activity-time {
    font-size: 12px;
    color: #6c7a89;
    min-width: 150px;
}

.activity-action {
    font-weight: bold;
    color: #0099ff;
    padding: 3px 10px;
    background: #e8f4ff;
    border-radius: 20px;
    font-size: 12px;
}

.activity-details {
    color: #1a2c3e;
    font-size: 13px;
}

/* Social Links Form */
.social-section-form .form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.social-section-form .form-group label {
    width: 100px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-section-form .form-group input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: white;
}

/* Password Form */
.password-form .form-group {
    margin-bottom: 15px;
}

.password-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: white;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6c7a89;
    font-style: italic;
}

/* Edit Script Modal */
#editScriptCode {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #0a0a20;
    color: #e0f7ff;
}

/* Leaderboard Page */
.leaderboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.leaderboard-header h1 {
    color: #0099ff;
    font-family: 'Orbitron', monospace;
    margin-bottom: 20px;
}

.rank-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.rank-tab {
    padding: 10px 25px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.rank-tab.active {
    background: #0099ff;
    color: white;
    border-color: #0099ff;
}

.leaderboard-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e8ed;
    transition: background 0.2s;
    cursor: pointer;
}

.leaderboard-row:hover {
    background: #f5f7fa;
}

.rank-number {
    width: 60px;
    font-weight: bold;
    font-size: 20px;
}

.rank-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    background: linear-gradient(135deg, #0099ff, #0077cc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: bold;
    font-size: 16px;
}

.rank-stats {
    font-size: 13px;
    color: #6c7a89;
}

.rank-score {
    font-weight: bold;
    color: #0099ff;
    font-size: 18px;
}

.rank-badge {
    margin-left: 10px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .leaderboard-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .rank-number {
        width: 40px;
        font-size: 16px;
    }
    .rank-avatar {
        width: 40px;
        height: 40px;
    }
    .rank-score {
        font-size: 14px;
    }
    .my-script-item {
        flex-direction: column;
        text-align: center;
    }
    .activity-item {
        flex-direction: column;
    }
    .activity-time {
        min-width: auto;
    }
    .social-section-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    .social-section-form .form-group label {
        width: auto;
    }
    
    /* ========== FIX MOBILE MENU - KÉO LÊN CAO HƠN ========== */
@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        transition: right 0.3s ease;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .header.open {
        right: 0;
        left: auto;
    }
    
    .header-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        padding: 70px 20px 20px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .nav-link {
        padding: 14px 0;
        font-size: 16px;
    }
    
    /* Đảm bảo admin link hiển thị đầy đủ */
    .nav-link:last-child {
        margin-bottom: 0;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
}
