/*
Theme Name: Xtreme IPTV
Description: قالب IPTV مع مولّد أكواد ولوحة تحكم
Version: 1.0
Author: You
Text Domain: xtreme-iptv
*/

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Cairo','Segoe UI',Tahoma,sans-serif;
    background: linear-gradient(145deg,#16213E,#12121c);
    color:#e0e0e0; direction:rtl; min-height:100vh; padding:20px;
}

/* Navbar */
.navbar {
    max-width:1100px; margin:0 auto 20px; display:flex; justify-content:center;
    gap:15px; padding:15px; background:#1A1A2E; border-radius:15px;
    box-shadow:5px 5px 10px #121220,-5px -5px 10px #22223C; flex-wrap:wrap;
}
.navbar a { color:#00BFFF; text-decoration:none; font-weight:600; padding:8px 18px; border-radius:10px; transition:.3s; }
.navbar a:hover { background:rgba(0,191,255,.1); }

/* Container */
.container {
    max-width:550px; margin:20px auto; padding:30px 25px;
    background:#1A1A2E; border-radius:20px;
    box-shadow:8px 8px 16px #121220,-8px -8px 16px #22223C;
}
.container.wide { max-width:1100px; }

.logo { text-align:center; font-size:28px; font-weight:bold; color:#00BFFF; margin-bottom:25px; text-shadow:0 0 10px rgba(0,191,255,.5); }

/* Input */
.input-group {
    display:flex; background:rgba(255,255,255,.05); border-radius:12px;
    margin-bottom:15px; overflow:hidden;
    box-shadow:inset 5px 5px 10px #121220,inset -5px -5px 10px #22223C;
}
.input-group input {
    flex:1; padding:14px 15px; background:transparent; border:none; outline:none;
    color:#00BFFF; font-family:'Courier New',monospace; font-size:15px; direction:ltr;
}
.copy-btn { background:#00BFFF; color:#12121c; border:none; padding:0 18px; cursor:pointer; font-size:18px; }
.copy-btn:hover { background:#0099CC; }

/* Buttons */
.btn, .btns button {
    background:linear-gradient(145deg,#00BFFF,#0099CC); color:#fff; border:none;
    padding:12px 20px; border-radius:12px; font-size:16px; font-weight:600;
    cursor:pointer; box-shadow:5px 5px 10px #121220,-5px -5px 10px #22223C;
    transition:.3s; font-family:inherit;
}
.btn:hover, .btns button:hover { transform:translateY(-2px); }
.btn.danger { background:linear-gradient(145deg,#e74c3c,#c0392b); }
.btn.small { padding:8px 12px; font-size:13px; }

.btns { display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }
.btns button { flex:1; min-width:120px; }

/* Alerts */
.alert { display:none; padding:12px; border-radius:10px; margin-top:15px; text-align:center; font-weight:600; }
.alert-success { background:rgba(76,175,80,.2); color:#4CAF50; border:1px solid #4CAF50; }
.alert-error   { background:rgba(244,67,54,.2); color:#e74c3c; border:1px solid #e74c3c; }
.alert-warning { background:rgba(255,152,0,.2); color:#ff9800; border:1px solid #ff9800; }
.alert-info    { background:rgba(33,150,243,.2); color:#2196F3; border:1px solid #2196F3; }

.count { text-align:center; margin-top:25px; font-size:17px; color:#ccc; }

/* Dashboard */
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin-bottom:25px; }
.stat { background:rgba(0,191,255,.08); padding:20px; border-radius:12px; text-align:center; border:1px solid rgba(0,191,255,.2); }
.stat .n { font-size:28px; color:#00BFFF; font-weight:bold; }

.card { background:#1e1e35; padding:20px; border-radius:15px; margin-bottom:20px; border:1px solid rgba(255,255,255,.05); }
.card h3 { color:#00BFFF; margin-bottom:15px; font-size:18px; }
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; flex-wrap:wrap; gap:10px; }

.row { display:flex; gap:10px; flex-wrap:wrap; }
.row input { flex:1; min-width:150px; padding:10px; border-radius:8px; border:1px solid rgba(255,255,255,.1); background:rgba(0,0,0,.3); color:#fff; font-family:inherit; }
.row input[type="date"] { color-scheme:dark; }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:15px; }
.user-card { background:#16162a; padding:15px; border-radius:12px; border:1px solid rgba(255,255,255,.05); }
.uc-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:10px; border-bottom:1px solid rgba(255,255,255,.05); }
.status { font-size:12px; padding:3px 10px; border-radius:20px; }
.status.active   { background:#4CAF50; color:#fff; }
.status.inactive { background:#e74c3c; color:#fff; }
.user-card p { font-size:14px; margin:5px 0; color:#b0b0c0; }
.user-card code { background:rgba(0,0,0,.4); padding:2px 6px; border-radius:4px; color:#00BFFF; }

.link-box { display:flex; margin:8px 0; background:rgba(0,0,0,.3); border-radius:8px; overflow:hidden; }
.link-box input { flex:1; padding:8px; border:none; background:transparent; color:#00BFFF; font-size:12px; direction:ltr; font-family:monospace; }
.link-box button { background:#00BFFF; color:#12121c; border:none; padding:0 12px; cursor:pointer; }

.actions { display:flex; gap:8px; margin-top:10px; }

/* Table */
.channels-table { width:100%; border-collapse:collapse; margin-top:10px; }
.channels-table th, .channels-table td { padding:10px; text-align:right; border-bottom:1px solid rgba(255,255,255,.05); font-size:14px; }
.channels-table th { color:#00BFFF; }

/* Responsive */
@media (max-width:600px) {
    .container { padding:20px 15px; }
    .logo { font-size:22px; }
    .stats { grid-template-columns:1fr; }
    .grid { grid-template-columns:1fr; }
}