@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sora:wght@400;600;700&display=swap');

:root {
    --bg-color: #09090b;
    --surface-color: #18181b;
    --border-color: #27272a;
    --text-color: #fafafa;
    --text-muted: #a1a1aa;
    --accent-color: #4ecdc4;
    --accent-hover: #3bb6ad;
    --accent-text: #09090b;
    --input-bg: #09090b;
    --secondary-bg: #27272a;
    --chat-customer-bg: #27272a;
    --chat-staff-bg: #18181b;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

html.light-theme {
    --bg-color: #f4f4f5;
    --surface-color: #ffffff;
    --border-color: #e4e4e7;
    --text-color: #09090b;
    --text-muted: #71717a;
    --accent-color: #0d9488;
    --accent-hover: #0f766e;
    --accent-text: #ffffff;
    --input-bg: #ffffff;
    --secondary-bg: #e4e4e7;
    --chat-customer-bg: #e4e4e7;
    --chat-staff-bg: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif;
    color: var(--text-color);
    font-weight: 700;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.logo-img {
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-color);
}

.nav-btn {
    background-color: var(--accent-color);
    color: var(--accent-text);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    background-color: var(--accent-hover);
}

.theme-toggle-btn, .lang-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle-btn:hover, .lang-toggle-btn:hover {
    color: var(--text-color);
    background-color: var(--secondary-bg);
}

.lang-toggle-btn {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    gap: 4px;
}

.main {
    flex-grow: 1;
    padding: 60px 0;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 100%;
    gap: 8px;
}

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

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

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

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

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

.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-link:hover {
    color: var(--text-color);
}

.form-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-title {
    font-size: 1.75rem;
    margin-bottom: 24px;
    text-align: center;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.form-redirect {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.alert-success {
    background-color: rgba(78, 205, 196, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.account-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.account-sidebar {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.account-nav-link:hover, .account-nav-link.active {
    background-color: var(--secondary-bg);
    color: var(--text-color);
}

.account-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.account-card-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.license-key-box {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    font-family: monospace;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: var(--text-color);
}

.ticket-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-item:last-child {
    border-bottom: none;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 9999px;
    display: inline-flex;
}

.badge-success {
    background-color: rgba(78, 205, 196, 0.15);
    color: var(--accent-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.chat-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.chat-msg {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.chat-msg-customer {
    align-self: flex-end;
    background-color: var(--chat-customer-bg);
    color: var(--text-color);
    border-bottom-right-radius: 0;
}

.chat-msg-staff {
    align-self: flex-start;
    background-color: var(--chat-staff-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-bottom-left-radius: 0;
}

.chat-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.doc-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.2s ease, background-color 0.3s ease;
}

.doc-card:hover {
    border-color: var(--accent-color);
}

.card-layout-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    width: 100%;
}

.centered-card {
    display: flex;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-left {
    width: 45%;
    padding: 50px 40px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--surface-color);
}

.card-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
    margin-bottom: 24px;
}

.card-left-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-left-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.card-left-links {
    margin-top: auto;
    font-size: 0.85rem;
}

.card-right {
    width: 55%;
    padding: 50px 50px;
    display: flex;
    flex-direction: column;
}

.card-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.card-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.card-tab:hover {
    color: var(--text-color);
}

.card-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.card-bottom-link {
    margin-top: 24px;
    text-align: right;
    font-size: 0.85rem;
}

.form-row-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
}

.form-checkbox-label input {
    accent-color: var(--accent-color);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

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

@media (max-width: 768px) {
    .centered-card {
        flex-direction: column;
        max-width: 480px;
    }
    .card-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 40px 30px;
        align-items: center;
        text-align: center;
    }
    .card-right {
        width: 100%;
        padding: 40px 30px;
    }
}

/* Header Dropdown Menu */
.dropdown {
    position: relative;
}
.dropdown-toggle {
    cursor: pointer;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 200px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 8px 0;
    list-style: none;
    margin-top: 12px;
}
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--border-color);
}
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -7px;
    right: 16px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--surface-color);
}
.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.dropdown-menu li a:hover {
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Marketplace Redesign Styles */
.hero-glow {
    position: relative;
    padding: 80px 0 50px 0;
    overflow: hidden;
    text-align: center;
    background: radial-gradient(circle at top, rgba(78, 205, 196, 0.15) 0%, transparent 60%);
}
.hero-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}
.hero-glow h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-color) 30%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-glow p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 36px auto;
    font-weight: 400;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}
.search-container {
    max-width: 620px;
    margin: 0 auto 40px auto;
    display: flex;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 6px;
}
.search-select {
    background: none;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0 16px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    background-color: var(--surface-color);
}
.search-input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--text-color);
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}
.search-btn {
    background-color: var(--secondary-bg);
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.search-btn:hover {
    background-color: var(--border-color);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0 80px 0;
}
.benefit-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.benefit-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}
.benefit-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--accent-color);
}
.benefit-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}
.benefit-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}
.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.filter-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.filter-tag {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.filter-tag:hover, .filter-tag.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--accent-text);
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}
.marketplace-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.marketplace-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.card-preview {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-color) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}
.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-pro {
    background-color: #f59e0b;
    color: #000;
}
.badge-free {
    background-color: var(--accent-color);
    color: var(--accent-text);
}
.badge-php {
    background-color: #3b82f6;
    color: #fff;
}
.card-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}
.card-title {
    font-size: 1.35rem;
    margin-bottom: 10px;
}
.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: auto;
}
.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}
.rating-stars {
    color: #eab308;
    display: flex;
    gap: 2px;
}
.rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.card-price-buy {
    display: flex;
    align-items: center;
    gap: 16px;
}
.card-price {
    font-size: 1.4rem;
    font-weight: 700;
}
.card-buy-btn {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-buy-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--accent-text);
}
