/* =========================================
   NETFLIX BLACK PREMIUM THEME
   ========================================= */

/* --- Fonts & Reset --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;900&display=swap');

:root {
  --primary: #e50914;         /* Netflix Red */
  --primary-hover: #ff1f2a;
  --bg-dark: #000000;
  --bg-card: #141414;
  --text-main: #ffffff;
  --text-muted: #b3b3b3;
  --border-color: #333333;
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.3);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* --- Premium Background Texture --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 50%, rgba(229, 9, 20, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(50, 0, 0, 0.2), transparent 25%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23222' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

/* --- Navbar --- */
nav {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

.nav-brand {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.8rem;
    letter-spacing: -0.05em;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.tutorial-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.tutorial-btn:hover {
    background: white;
    color: black;
    border-color: white;
}

/* --- Layout Containers --- */
.page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 10;
}

/* --- Typography --- */
header {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* --- SPECIFIC GRID LAYOUT (The Requirement) --- */
.device-grid {
  display: grid;
  /* Mobile Default: 2 columns, 2 rows */
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto; 
  gap: 15px;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 3rem;
}

/* PC Override: 3 columns, 1 row */
@media (min-width: 768px) {
    .device-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        gap: 25px;
    }
}

/* --- Device Cards (Black Glass Style) --- */
.device-card {
  background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 2rem 1rem;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  height: 100%;
}

/* Red Glow Hover Effect */
.device-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 0 rgba(229, 9, 20, 0);
    transition: box-shadow 0.3s ease;
}

.device-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(229, 9, 20, 0.15);
}
.device-card:hover::after {
    box-shadow: inset 0 0 20px rgba(229, 9, 20, 0.1);
}

/* Avatar/Icon Styling */
.device-icon-wrapper {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #000;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.device-card:hover .device-icon-wrapper {
  border-color: var(--primary);
  background: linear-gradient(135deg, #220a0a, #000);
  transform: scale(1.1);
}

.device-card i {
  font-size: 2rem;
  color: #666;
  transition: color 0.3s ease;
}

.device-card:hover i {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary));
}

.device-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Layout Logic for Specific Cards --- */
/* Mobile: TV spans full top row */
.card-tv-container {
    grid-column: 1 / -1; 
    grid-row: 1;
}
/* Mobile: Mobile Card Left */
.card-mobile-container {
    grid-column: 1 / 2;
    grid-row: 2;
}
/* Mobile: PC Card Right */
.card-pc-container {
    grid-column: 2 / 3;
    grid-row: 2;
}

/* Desktop: Reset to standard flow */
@media (min-width: 768px) {
    .card-tv-container, .card-mobile-container, .card-pc-container {
        grid-column: auto;
        grid-row: auto;
    }
    /* Order: Mobile - PC - TV (or adjust as you prefer) */
    .card-mobile-container { order: 1; }
    .card-pc-container { order: 2; }
    .card-tv-container { order: 3; }
}

/* --- Premium Gold Banner --- */
.premium-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Gold Accent Line */
.premium-banner::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.premium-banner:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.premium-content {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}

.premium-icon {
    color: var(--gold);
    font-size: 2rem;
    filter: drop-shadow(0 0 5px var(--gold));
}

.premium-text h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}
.premium-text span {
    color: var(--gold);
}

.premium-text p {
    color: #999;
    font-size: 0.9rem;
    margin-top: 4px;
}

.premium-btn {
    background: var(--gold);
    color: black;
    font-weight: 800;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
}

.premium-banner:hover .premium-btn {
    background: #ffe033;
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--gold);
}

@media (min-width: 768px) {
    .premium-banner { flex-direction: row; text-align: left; }
    .premium-content { flex-direction: row; text-align: left; }
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  font-size: 0.8rem;
  width: 100%;
  margin-top: auto;
  background: black;
  border-top: 1px solid #222;
}

footer a { color: #888; text-decoration: none; }
footer a:hover { color: white; text-decoration: underline; }

/* --- Auth Box Styling (for verify_*.php) --- */
.auth-box {
  background: #141414;
  padding: 3rem 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 450px;
  border: 1px solid #333;
  text-align: center;
  position: relative;
}
.auth-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.form-control-custom {
  width: 100%;
  background: #333;
  border: none;
  padding: 1rem;
  font-size: 1.2rem;
  color: white;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 1rem;
}
.form-control-custom:focus {
    background: #444;
    outline: 2px solid var(--primary);
}
.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-primary:hover { background: #f40612; }

/* --- Animations --- */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Fixes --- */
@media (max-width: 480px) {
    .page-container { padding: 30px 15px; }
    .hero-title { font-size: 2.2rem; }
    .device-icon-wrapper { width: 4rem; height: 4rem; margin-bottom: 0.8rem; }
    .device-card i { font-size: 1.6rem; }
    .premium-content { flex-direction: column; text-align: center; }
}