/* ===== Leetify-inspired Dark Theme ===== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #1a1625;
    color: #e0dce8;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #e84393;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fd79a8;
}

/* --- Top Navigation Bar --- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #13111a;
    padding: 0 24px;
    height: 60px;
    border-bottom: 1px solid #2d2640;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.topbar-brand .brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e84393, #6c5ce7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-nav a {
    color: #a39bb8;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.topbar-nav a:hover {
    background-color: #252136;
    color: #fff;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #e84393, #d63384);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: #e0dce8;
    border: 1px solid #3d3556;
}

.btn-secondary:hover {
    background-color: #252136;
    color: #fff;
    border-color: #5a4f7a;
}

.btn-accent {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #7c6df7, #b86eff);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* --- Layout --- */
.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title-left {
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* --- Sidebar --- */
.sidebar {
    width: 220px;
    background-color: #13111a;
    border-right: 1px solid #2d2640;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b6182;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #a39bb8;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-link:hover {
    background-color: #1e1a2a;
    color: #fff;
}

.sidebar-link.active {
    background-color: #252136;
    color: #e84393;
    border-left: 3px solid #e84393;
    padding-left: 17px;
}

.sidebar-link .sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 15px;
    color: #8a7fa0;
    margin-bottom: 28px;
}

/* --- Cards --- */
.card {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: #3d3556;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.card-body {
    color: #c4bdd6;
    font-size: 14px;
}

/* --- Upload Sections --- */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.upload-card {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 12px;
    padding: 28px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.upload-card:hover {
    border-color: #e84393;
    box-shadow: 0 0 20px rgba(232, 67, 147, 0.08);
}

.upload-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.upload-card-desc {
    font-size: 14px;
    color: #8a7fa0;
    margin-bottom: 20px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #a39bb8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background-color: #161222;
    border: 1px solid #2d2640;
    border-radius: 8px;
    color: #e0dce8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #e84393;
}

.form-input::placeholder {
    color: #5a4f7a;
}

/* File input styling */
.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    background-color: #161222;
    border: 1px solid #2d2640;
    border-radius: 8px;
    color: #a39bb8;
    font-size: 13px;
    cursor: pointer;
}

.file-input-wrapper input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
    transition: background 0.2s;
}

.file-input-wrapper input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #7c6df7, #b86eff);
}

.file-type-label {
    font-size: 13px;
    color: #6b6182;
    white-space: nowrap;
}

/* --- Result / Status --- */
.result-box {
    background-color: #161222;
    border: 1px solid #2d2640;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    color: #c4bdd6;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 40px;
    max-height: 400px;
    overflow-y: auto;
}

.result-box:empty {
    display: none;
}

/* Death map image */
.deathmap-container {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2d2640;
}

.deathmap-container img {
    width: 100%;
    display: block;
}

/* --- Auth Modal / Forms --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 8, 16, 0.8);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: modalSlideIn 0.25s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #6b6182;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
    background: none;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 14px;
    color: #8a7fa0;
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-label {
    margin-bottom: 8px;
}

.auth-form .form-input {
    padding: 12px 16px;
}

.auth-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #8a7fa0;
}

.auth-switch a {
    color: #e84393;
    font-weight: 600;
}

.auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.auth-message.error {
    background-color: rgba(232, 67, 67, 0.12);
    border: 1px solid rgba(232, 67, 67, 0.3);
    color: #ff6b6b;
}

.auth-message.success {
    background-color: rgba(0, 206, 158, 0.12);
    border: 1px solid rgba(0, 206, 158, 0.3);
    color: #00ce9e;
}

/* --- Profile Section --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #e84393, #6c5ce7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-admin {
    background-color: rgba(232, 67, 147, 0.2);
    color: #e84393;
    border: 1px solid rgba(232, 67, 147, 0.3);
}

.badge-win {
    background-color: rgba(0, 206, 158, 0.2);
    color: #00ce9e;
}

.badge-loss {
    background-color: rgba(232, 67, 67, 0.2);
    color: #ff6b6b;
}

/* --- Reviews Grid --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.review-card {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s;
}

.review-card:hover {
    border-color: #3d3556;
}

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

.review-game-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.review-rating {
    color: #ffd700;
    font-weight: 600;
    font-size: 14px;
}

.review-text {
    font-size: 14px;
    color: #a39bb8;
    margin-bottom: 12px;
    max-height: 80px;
    overflow: hidden;
}

.review-meta {
    font-size: 12px;
    color: #6b6182;
}

.review-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2d2640;
}

/* --- Logged-in user topbar --- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #e84393, #6c5ce7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #e0dce8;
}

/*results*/ 
.results-section {
    width: 100%;
    margin-top: 30px;
    padding: 0; /* match main-content spacing */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Match upload-card exactly */
.stat-card {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s, transform 0.15s;
}

.stat-card:hover {
    border-color: #e84393;
    transform: translateY(-2px);
}

/* Value = bold + bright */
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

/* Label = subtle */
.stat-label {
    font-size: 12px;
    color: #8a7fa0;
    margin-top: 4px;
}
/* Progress bar container */
.stat-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08); 
    border-radius: 999px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #4ade80, #86efac);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Tips container */
.tips-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Match card style again */
.tip-card {
    background-color: #211d2e;
    border: 1px solid #2d2640;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s;
}

.tip-card:hover {
    border-color: #e84393;
}

.tip-text {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
    color: #e5e7eb;
}

.tip-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}


/* Video link styling */
.tip-card a {
    color: #e84393;
    font-weight: 600;
}

.tip-card a:hover {
    color: #fd79a8;
}
.video-toggle {
  margin-top: 10px;
  background: none;
  border: none;
  color: #4ade80;
  font-weight: 500;
  cursor: pointer;
}

.video-container {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; 
  background: #000; 
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.hidden {
  display: none;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 20px 16px;
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 12px;
    }

    .topbar-nav {
        display: none;
    }

    .modal-box {
        margin: 16px;
        padding: 24px;
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #13111a;
}

::-webkit-scrollbar-thumb {
    background: #3d3556;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a4f7a;
}
