/* Global Styles */
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #121212; color: #e0e0e0; margin: 0; display: flex; height: 100vh; overflow: hidden; }

/* Login Page Specifics */
body.login-body { justify-content: center; align-items: center; overflow: auto; }
body.login-body .card { max-width: 400px; width: 100%; padding: 2.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
body.login-body input { margin-bottom: 1.2rem; }

/* Sidebar Layout */
.dashboard-container { display: flex; width: 100%; height: 100%; }
.sidebar { width: 260px; background: #1e1e1e; border-right: 1px solid #333; display: flex; flex-direction: column; padding: 20px; box-sizing: border-box; flex-shrink: 0; }
.main-content { flex: 1; overflow-y: auto; padding: 30px; background: #121212; position: relative; }

/* Sidebar Nav */
.sidebar-header { margin-bottom: 40px; padding-left: 10px; }
.sidebar-header h1 { margin: 0; font-size: 1.5rem; background: linear-gradient(135deg, #fff 0%, #b0b3b8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-nav { display: flex; flex-direction: column; gap: 10px; }
.nav-item { padding: 12px 15px; border-radius: 10px; color: #b0b3b8; text-decoration: none; font-weight: 500; transition: all 0.2s; display: flex; align-items: center; gap: 10px; cursor: pointer; border: 1px solid transparent; }
.nav-item:hover { background: #2d2d2d; color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%); color: #667eea; border-color: rgba(102, 126, 234, 0.2); }
.nav-item.logout { margin-top: auto; color: #ff6b6b; }
.nav-item.logout:hover { background: rgba(220, 53, 69, 0.1); border-color: rgba(220, 53, 69, 0.2); }

/* Content Sections */
.content-section { display: none; animation: fadeIn 0.3s ease; }
.content-section.active { display: block; }

/* Components */
.card { background: #1e1e1e; padding: 25px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); margin-bottom: 25px; border: 1px solid #333; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
input, select { padding: 12px 16px; background: #2d2d2d; border: 1px solid #404040; border-radius: 10px; width: 100%; box-sizing: border-box; color: #fff; outline: none; transition: all 0.3s ease; font-size: 0.95rem; display: block; }
input:focus, select:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); background: #333; }
label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; color: #b0b3b8; }
button { width: 100%; }
button.primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 28px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: transform 0.2s, opacity 0.2s; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); width: auto; }
button.primary:hover { transform: translateY(-2px); opacity: 0.9; }
button.primary:active { transform: translateY(0); }
button.danger { background: rgba(220, 53, 69, 0.2); color: #ff6b6b; border: 1px solid rgba(220, 53, 69, 0.3); padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all 0.3s; font-weight: 500; width: auto; }
button.danger:hover { background: rgba(220, 53, 69, 0.3); color: #ff4d4d; }

/* Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #1e1e1e; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.2); border: 1px solid #333; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid #333; color: #e0e0e0; }
th { background: #252525; font-weight: 600; color: #b0b3b8; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #252525; }
img.preview { width: 36px; height: 36px; object-fit: contain; background: #2d2d2d; border-radius: 8px; padding: 4px; }
.badge { padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; background: #2d2d2d; color: #b0b3b8; border: 1px solid #333; font-weight: 500; }

/* Alerts & Links */
.alert, .error, .success { padding: 15px; border-radius: 10px; margin-bottom: 25px; border: 1px solid transparent; text-align: center; }
.alert.success, .success { background: rgba(21, 87, 36, 0.2); color: #75b798; border-color: rgba(21, 87, 36, 0.3); }
.alert.error, .error { background: rgba(114, 28, 36, 0.2); color: #ea868f; border-color: rgba(114, 28, 36, 0.3); }
.link { display: block; text-align: center; margin-top: 15px; color: #b0b3b8; text-decoration: none; font-size: 0.9rem; }
.link:hover { color: #fff; text-decoration: underline; }
h2 { text-align: center; margin-top: 0; margin-bottom: 20px; color: #fff; }

/* Tournament Section */
.tournament-section { margin-bottom: 35px; }
.tournament-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 18px 25px; border-radius: 16px 16px 0 0; font-size: 1.2rem; font-weight: 600; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.tournament-header img { width: 44px; height: 44px; object-fit: contain; background: white; border-radius: 10px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* Date Tabs */
.date-tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 1px solid #333; padding-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.date-tabs::-webkit-scrollbar { display: none; }
.date-tab { background: #1e1e1e; border: 1px solid #333; padding: 14px 24px; cursor: pointer; font-weight: 500; color: #b0b3b8; border-radius: 12px 12px 0 0; transition: all 0.3s; border-bottom: none; white-space: nowrap; position: relative; top: 1px; }
.date-tab:hover { background: #252525; color: #fff; }
.date-tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 15px 24px; margin-top: -1px; box-shadow: 0 -4px 15px rgba(102, 126, 234, 0.3); }
.tab-content { display: none; animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid #121212; }
::-webkit-scrollbar-thumb:hover { background: #444; }
