@import url('https://fonts.googleapis.com/css2?family=Oldenburg&family=Cinzel:wght@400;600;700;900&family=Crimson+Text:wght@400;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  --primary-color: #8b0000;
  --secondary-color: #c7a700;
  --dark-bg: #1a1a1a;
  --darker-bg: #0d0d0d;
  --light-text: #e0e0e0;
  --border-color: #3a3a3a;
  --success-color: #2d5f2d;
  --danger-color: #8b0000;
  --imperial-red: #8b0000;
  --gold: #c7a700;
  --parchment: #f4e9d9;
}

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

body {
  font-family: 'Oldenburg', 'Georgia', 'Times New Roman', serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  min-height: 100vh;
  position: relative;
  background-image: 
    linear-gradient(rgba(13, 13, 13, 0.85), rgba(13, 13, 13, 0.85)),
    url('/images/eagle.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 60%;
  background-attachment: fixed;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
  border-bottom: 4px solid var(--imperial-red);
  padding: 1rem 0;
  box-shadow: 
    0 4px 20px rgba(139, 0, 0, 0.5),
    inset 0 1px 0 rgba(199, 167, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  position: relative;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--gold) 20%, 
    var(--gold) 80%, 
    transparent 100%
  );
}

.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--light-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 3px;
  transition: all 0.3s ease;
  font-family: 'Cinzel', Georgia, serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.logo img {
  height: 45px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(139, 0, 0, 0.6));
}

.logo:hover {
  color: var(--secondary-color);
  text-shadow: 0 0 20px rgba(199, 167, 0, 0.5);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-info {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-left: 2px solid var(--primary-color);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Headings */
h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--secondary-color);
  font-size: 2.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 
    0 0 20px rgba(199, 167, 0, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  font-family: 'Oldenburg', 'Cinzel', Georgia, serif;
  font-weight: normal;
  position: relative;
}

h1::before,
h1::after {
  content: '⚔';
  color: var(--imperial-red);
  margin: 0 1rem;
  font-size: 0.8em;
  font-family: Arial, sans-serif;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 0;
  margin-bottom: 2rem;
  border-left: 5px solid;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  font-family: 'Oldenburg', Georgia, serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.alert-info {
  border-color: #4a90e2;
  color: #4a90e2;
}

.alert-warning {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.alert a {
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: underline;
}

/* Giveaways Grid */
.giveaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Giveaway Card */
.giveaway-card {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.95) 100%);
  border: 3px solid var(--border-color);
  border-radius: 0;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(199, 167, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.giveaway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, 
    var(--imperial-red) 0%, 
    var(--gold) 20%, 
    var(--imperial-red) 40%,
    var(--gold) 60%,
    var(--imperial-red) 80%,
    var(--gold) 100%
  );
  background-size: 200% 100%;
  animation: imperialShimmer 4s linear infinite;
}

.giveaway-card::after {
  content: '✠';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  color: var(--imperial-red);
  opacity: 0.15;
  pointer-events: none;
}

@keyframes imperialShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.giveaway-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 
    0 8px 30px rgba(139, 0, 0, 0.5),
    0 0 40px rgba(199, 167, 0, 0.2),
    inset 0 1px 0 rgba(199, 167, 0, 0.2);
}

.giveaway-header h2 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  text-shadow: 
    0 0 15px rgba(199, 167, 0, 0.4),
    1px 1px 3px rgba(0, 0, 0, 0.8);
}

.featured-game {
  color: var(--light-text);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.9;
  font-family: 'Oldenburg', Georgia, serif;
  letter-spacing: 0.5px;
  font-weight: normal;
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 1rem 0;
  border-radius: 0;
  overflow: hidden;
  border: 3px solid var(--border-color);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.7),
    inset 0 0 20px rgba(139, 0, 0, 0.2);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Giveaway Stats */
.giveaway-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 0;
  border: 2px solid var(--border-color);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 700;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--light-text);
}

.countdown {
  color: var(--primary-color);
  font-family: monospace;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: 'Libre Baskerville', Georgia, serif;
  position: relative;
  box-shadow: 
    2px 2px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: #a00000;
  border-color: #a00000;
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

.btn-secondary {
  background: var(--border-color);
  color: var(--light-text);
  border-color: var(--border-color);
}

.btn-success {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.btn-success:hover {
  background: #3a7a3a;
  border-color: #3a7a3a;
  box-shadow: 0 0 20px rgba(45, 95, 45, 0.5);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background: #a00000;
  border-color: #a00000;
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.button-container {
  margin-top: 1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
  padding: 2rem;
  border: 4px solid var(--gold);
  border-radius: 0;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 
    0 10px 50px rgba(139, 0, 0, 0.7),
    0 0 100px rgba(199, 167, 0, 0.3),
    inset 0 1px 0 rgba(199, 167, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
  position: relative;
}

.modal-content::before {
  content: '✠';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(199, 167, 0, 0.8);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-size: 2.2rem;
  text-transform: uppercase;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  text-shadow: 
    0 0 20px rgba(199, 167, 0, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.8);
}

#win-details {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#win-details h3 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

#win-details .game-key {
  background: var(--darker-bg);
  padding: 1rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 1.1rem;
  color: var(--secondary-color);
  word-break: break-all;
  border: 1px solid var(--primary-color);
  margin: 1rem 0;
}

/* Admin Styles */
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  background: rgba(26, 26, 26, 0.95);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--darker-bg);
  color: var(--secondary-color);
  padding: 1rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--primary-color);
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--light-text);
}

.admin-table tr:hover {
  background: rgba(139, 0, 0, 0.1);
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-active {
  background: var(--success-color);
  color: white;
}

.badge-inactive {
  background: var(--border-color);
  color: var(--light-text);
}

/* Responsive */
@media (max-width: 768px) {
  .giveaways-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .logo {
    font-size: 1.2rem;
  }
  
  .logo img {
    height: 40px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
}