* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg-body: #f8fafc; --primary: #4f46e5; --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
    --text-main: #1e293b; --text-muted: #64748b; --bg-btn-toggle: #f1f5f9;
    --bg-container: #ffffff; --border: #f1f5f9; --input-bg: #f8fafc;
}
.dark {
    --bg-body: #0f172a; --text-main: #f1f5f9; --text-muted: #94a3b8;
    --bg-container: #1e293b; --bg-btn-toggle: #334155; --border: #334155; --input-bg: #1e293b;
}

body { font-family: 'Inter', sans-serif; background-color: var(--bg-body); color: var(--text-main); padding: 15px; min-height: 100vh; transition: background 0.3s; }

.container { width: 100%; max-width: 800px; background: var(--bg-container); border-radius: 16px; margin: 0 auto; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); overflow: hidden; }
.content-padding { padding: 20px; }

.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header-flex h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

.btn-nav { background: var(--bg-btn-toggle); color: var(--text-main); padding: 10px 15px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 700; }

.data-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--bg-container); margin-bottom: 20px; }

.upload-zone { background: var(--bg-body); border: 2px dashed var(--border); border-radius: 12px; padding: 30px 20px; text-align: center; cursor: pointer; margin-bottom: 20px; }
.upload-zone i { font-size: 30px; color: var(--text-muted); margin-bottom: 10px; }
#game-label { font-size: 14px; font-weight: 700; color: var(--text-muted); }

.field-row { display: flex; align-items: center; background: var(--bg-body); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid var(--border); }
.field-row label { flex: 0 0 130px; font-weight: 700; font-size: 13px; color: var(--text-muted); text-transform: uppercase; white-space: nowrap; }
.field-row input, .field-row select {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    outline: none !important;
    padding: 0 10px;
    height: auto;
    line-height: normal;
}

/* FIX PLACEHOLDER COLOR */
input::placeholder { color: #94a3b8 !important; opacity: 1 !important; }
input::-webkit-input-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
input::-moz-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
input:-ms-input-placeholder { color: #94a3b8 !important; opacity: 1 !important; }


.btn-action { display: flex; width: 100%; padding: 15px; border-radius: 12px; font-weight: 700; font-size: 16px; cursor: pointer; border: none; align-items: center; justify-content: center; gap: 10px; transition: 0.3s; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; margin-top: 15px; }

.alert { padding: 15px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; border-left: 5px solid; }
.alert-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: var(--danger); }

/* Table styles for datanro.php */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { background: var(--bg-body); color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 12px 15px; text-align: left; border-bottom: 2px solid var(--border); }
td { padding: 12px 15px; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(79, 70, 229, 0.05); }

@media (max-width: 600px) {
    .field-row label { flex-basis: 90px; font-size: 11px; }
    .field-row input { font-size: 14px; }

    .table-responsive table, .table-responsive thead, .table-responsive tbody, .table-responsive th, .table-responsive td, .table-responsive tr {
        display: block;
    }
    .table-responsive thead tr { position: absolute; top: -9999px; left: -9999px; }
    .table-responsive tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 10px; background: var(--bg-container); }
    .table-responsive td { border: none; border-bottom: 1px solid var(--border); position: relative; padding-left: 40% !important; text-align: right; min-height: 40px; display: flex; align-items: center; justify-content: flex-end; }
    .table-responsive td:last-child { border-bottom: none; }
    .table-responsive td:before { content: attr(data-label); position: absolute; left: 10px; width: 35%; padding-right: 10px; white-space: nowrap; font-weight: 700; color: var(--text-muted); font-size: 11px; text-transform: uppercase; text-align: left; }
}

.search-box { margin-bottom: 20px; }
.search-input { width: 100%; padding: 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-body); color: var(--text-main); font-size: 14px; font-weight: 600; outline: none; transition: 0.3s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }

.no-result { text-align: center; padding: 40px 20px; color: var(--text-muted); display: none; }

#backToTop { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; background: var(--primary); color: white; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; transition: 0.3s; }
#backToTop:hover { transform: translateY(-3px); }

.fa-spin { animation: spin 1s linear infinite; }
@keyframes spin { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }