:root {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-input: #2c2c2c;
    --border: #333;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #007bff;
    --accent-hover: #0056b3;
    --warning: #ffc107;
    --danger: #ff4d4d;
    --success-bg: #1e4620;
    --success-text: #75b798;
    --error-bg: #5c1e1e;
    --error-text: #ea868f;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

body { background: var(--bg-body); color: var(--text); font-family: var(--font-main); margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: 0.2s; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
.btn { padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; font-size: 14px; display: inline-block; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-warning { background: var(--warning); color: #121212; }
.btn-cancel { color: #aaa; margin-right: 15px; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; margin-right: 5px; background: #333; color: #fff; border: 1px solid #444; }
.btn-sm:hover { background: #444; }

input, select, textarea { padding: 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; color: #fff; font-family: inherit; width: 100%; box-sizing: border-box; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* ADMIN LAYOUT */
.header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.card { background: var(--bg-card); border: 1px solid var(--border); padding: 25px; border-radius: 12px; margin-bottom: 30px; }
.card.edit-mode { border-color: var(--warning); box-shadow: 0 0 10px rgba(255,193,7,0.1); }

/* DASHBOARD */
.dashboard-grid { display: flex; gap: 20px; margin-bottom: 30px; }
.dash-box { flex: 1; background: var(--bg-card); border: 1px solid var(--border); padding: 20px; border-radius: 12px; text-align: center; }
.dash-number { font-size: 2.5rem; font-weight: bold; color: var(--accent); display: block; margin-bottom: 5px; }
.dash-label { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* TABS */
.tab-header { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-btn { padding: 10px 20px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-weight: bold; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* FORM */
.form-row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* TABLE */
table { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--bg-card); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 15px; border-bottom: 1px solid var(--border); }
th { background: #252525; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; }
tr:hover { background: #2c2c2c; }

/* TOOLBAR & EDITOR */
.toolbar { display: flex; gap: 5px; margin-bottom: 8px; flex-wrap: wrap; background: #252525; padding: 8px; border-radius: 6px 6px 0 0; border: 1px solid var(--border); border-bottom: none; }
.tool-group { display: flex; gap: 2px; border-right: 1px solid #444; padding-right: 5px; margin-right: 5px; }
.tool-group:last-child { border-right: none; }
.tool-btn { background: #333; color: #ccc; border: 1px solid #444; padding: 5px 10px; font-size: 0.8rem; cursor: pointer; border-radius: 3px; min-width: 30px; }
.tool-btn:hover { background: #444; color: #fff; border-color: #555; }
#inputCode { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; width: 100%; height: 200px; font-family: var(--font-mono); box-sizing: border-box; }

/* TOGGLE SWITCH (AKTİF/PASİF) */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success-text); }
input:checked + .slider:before { transform: translateX(20px); }

/* PREVIEW & GO.PHP */
.center-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; text-align: center; }
.box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 90%; max-width: 400px; margin-bottom: 20px; position: relative; }
.custom-box { padding: 0; overflow: hidden; display: flex; justify-content: center; align-items: center; flex-direction: column; }
.custom-content-padding { padding: 20px; width: 100%; box-sizing: border-box; }
.custom-content-padding img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.timer-box { padding: 40px; }
.timer-circle { font-size: 4rem; font-weight: 700; color: #4CAF50; margin: 20px 0; }
.btn-go, .preview-btn-go { display: inline-block; margin-top: 20px; padding: 12px 25px; background: #333; color: #fff; text-decoration: none; border-radius: 6px; font-size: 0.9rem; transition: 0.3s; }
.btn-go:hover { background: #4CAF50; color: #fff; }

#live-preview-container { margin-top: 20px; padding: 20px; background: #000; border: 1px dashed #444; border-radius: 8px; display: flex; flex-direction: column; align-items: center; }
.preview-label { width: 100%; text-align: center; color: #555; font-size: 0.8rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }

.park-page { background-color: #050505; color: #ccc; font-family: var(--font-mono); height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.park-title { font-size: 4rem; margin: 0; color: #fff; letter-spacing: -3px; }
.park-desc { opacity: 0.5; margin-top: 10px; }
.footer { position: absolute; bottom: 20px; font-size: 12px; opacity: 0.3; }

.msg { padding: 15px; margin-bottom: 20px; border-radius: 6px; font-weight: 500; }
.msg.success { background: var(--success-bg); color: var(--success-text); }
.msg.error { background: var(--error-bg); color: var(--error-text); }

/* MODAL */
.modal { display: none; position: fixed; z-index: 99; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(2px); }
.modal-content { background-color: var(--bg-card); margin: 5% auto; padding: 25px; width: 90%; max-width: 600px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); position: relative; }
.close-modal { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: var(--text-muted); }
.close-modal:hover { color: #fff; }
.log-list { max-height: 400px; overflow-y: auto; margin-top: 15px; border-top: 1px solid var(--border); }
.log-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9em; display: flex; justify-content: space-between; }
.log-item span { color: var(--text-muted); font-size: 0.8em; }
#qrImage { display: block; margin: 20px auto; max-width: 100%; }
.geo-row { display: flex; gap: 10px; margin-bottom: 10px; }