/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d0d0d;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px 0;
    border-bottom: 3px solid #f0b90b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.logo {
    color: #f0b90b;
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

.tagline {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #f0b90b 0%, #d4a00a 100%);
    color: #0d0d0d;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d4a00a 0%, #f0b90b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 185, 11, 0.4);
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    width: 100%;
}

.btn-secondary {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #444;
}

/* Status Bar */
.status-bar {
    background-color: #1a1a1a;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #333;
}

.hero-title {
    font-size: 48px;
    color: #f0b90b;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 20px;
    color: #888;
    margin-bottom: 40px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 30px 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: #f0b90b;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(240, 185, 11, 0.2);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #f0b90b;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-bar .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.status-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-item .label {
    color: #888;
    font-size: 14px;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.open {
    background-color: #28a745;
    color: white;
}

.badge.closed {
    background-color: #dc3545;
    color: white;
}

/* Panels */
.panel {
    padding: 60px 0;
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header h2 {
    color: #f0b90b;
    margin-bottom: 10px;
    font-size: 32px;
}

.panel-header p {
    color: #888;
    font-size: 16px;
}

.panel h2 {
    color: #f0b90b;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Form Elements */
.form-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Register Panel */
.register-panel {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

.register-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.register-info {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.register-info h3 {
    color: #f0b90b;
    margin-bottom: 20px;
    font-size: 22px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.benefits-list li {
    padding: 12px 0;
    border-bottom: 1px solid #333;
    font-size: 16px;
    color: #e0e0e0;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.price-tag {
    background: linear-gradient(135deg, #f0b90b 0%, #d4a00a 100%);
    color: #0d0d0d;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.price-label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.price-value {
    display: block;
    font-size: 32px;
}

.register-form {
    background: #1a1a1a;
    border: 2px solid #f0b90b;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.register-form label {
    color: #f0b90b;
    font-weight: 600;
    font-size: 16px;
}

.help-text {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 0;
}

.input-field {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
}

.input-field:focus {
    outline: none;
    border-color: #f0b90b;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.card {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s;
}

.card:hover {
    border-color: #f0b90b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(240, 185, 11, 0.2);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.highlight-card {
    border-color: #f0b90b;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2410 100%);
}

.card h3 {
    color: #f0b90b;
    margin-bottom: 20px;
    font-size: 20px;
}

.big-number {
    font-size: 36px;
    font-weight: bold;
    color: #f0b90b;
    margin: 15px 0;
}

.small-text {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-info p {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #0d0d0d;
    border-radius: 6px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    padding: 15px 30px;
    background: #1a1a1a;
    border: 2px solid #333;
    color: #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.tab-btn:hover {
    border-color: #f0b90b;
    background: #252525;
}

.tab-btn.active {
    background: linear-gradient(135deg, #f0b90b 0%, #d4a00a 100%);
    color: #0d0d0d;
    border-color: #f0b90b;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

.tab-icon {
    font-size: 20px;
}

/* Levels Grid */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.level-card {
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.2);
}

.level-card.active {
    border-color: #28a745;
}

.level-card.blocked {
    border-color: #dc3545;
}

.level-card.inactive {
    border-color: #666;
}

.level-card h4 {
    color: #f0b90b;
    margin-bottom: 10px;
}

.level-card p {
    font-size: 14px;
    margin: 5px 0;
}

.level-card .price {
    font-weight: bold;
    color: #fff;
}

.level-card .earnings {
    color: #28a745;
    font-size: 12px;
}

/* Matrix Detail */
#matrixDetailContent {
    margin-top: 20px;
}

.matrix-tree {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tree-node {
    background-color: #1a1a1a;
    border: 1px solid #f0b90b;
    border-radius: 6px;
    padding: 10px;
    min-width: 120px;
    text-align: center;
    font-size: 12px;
}

.tree-node.empty {
    border-color: #333;
    color: #666;
}

/* Lookup Result */
.lookup-result {
    margin-top: 20px;
}

.lookup-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.lookup-card h3 {
    color: #f0b90b;
    margin-bottom: 15px;
}

.lookup-card p {
    margin: 8px 0;
}

/* Event Feed */
.event-list {
    max-height: 400px;
    overflow-y: auto;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
}

.event-item {
    padding: 10px;
    border-bottom: 1px solid #333;
    font-size: 14px;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item .event-type {
    color: #f0b90b;
    font-weight: 600;
}

.event-item .event-time {
    color: #666;
    font-size: 12px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #1a1a1a;
    border: 2px solid #f0b90b;
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 250px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.error {
    border-color: #dc3545;
}

.toast.success {
    border-color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .status-bar .container {
        flex-direction: column;
        gap: 10px;
    }

    .levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-field {
        min-width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #f0b90b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a00a;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #1a1a1a;
    border: 2px solid #f0b90b;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(240, 185, 11, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    color: #f0b90b;
}

.btn-close {
    background: none;
    border: none;
    color: #f0b90b;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.btn-close:hover {
    background-color: #f0b90b;
    color: #0d0d0d;
}

.modal-body {
    padding: 20px;
}
