/* ============================================
   BASE STYLES
   Reset, typography, colors, and global styles
   ============================================ */

/* CSS Variables */
:root {
  /* Colors */
  --primary-color: #ffcc00;
  --primary-hover: #ffd633;
  --primary-dark: #ffaa00;
  --dark-bg: #111;
  --dark-secondary: #1a1a2e;
  --dark-tertiary: #16213e;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  --text-primary: #222;
  --text-secondary: #666;
  --text-light: #cbd5e0;
  --border-color: #e8e8e8;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 6px 20px rgba(255, 204, 0, 0.4);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
  margin: 0 0 1rem 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.nav a svg {
    margin-right: 4px;
}

.notice-container {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, #ff4b2b, #ff416c);
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 2px 0;
  position: relative;
  white-space: nowrap;
}

.notice-text {
  display: inline-block;
  padding-left: 100%;
  animation: scrollText 20s linear infinite;
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Tùy chọn: dừng chuyển động khi hover */
.notice-container:hover .notice-text {
  animation-play-state: paused;
}

/* Notification Bell Icon */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-bell svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 400px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.notification-dropdown.show {
    display: flex;
}

.notification-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.mark-all-read {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.mark-all-read:hover {
    background: rgba(102, 126, 234, 0.1);
}

.notification-list {
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.notification-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.notification-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.notification-message {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notification-action {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #667eea;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.notification-action:hover {
    background: #5568d3;
}

.notification-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6c757d;
}

.notification-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Notification Type Colors */
.notification-item.info { border-left: 4px solid #17a2b8; }
.notification-item.success { border-left: 4px solid #28a745; }
.notification-item.warning { border-left: 4px solid #ffc107; }
.notification-item.error { border-left: 4px solid #dc3545; }
.notification-item.announcement { border-left: 4px solid #667eea; }
/* Read notification styling */
.notification-item.read {
    background: #f8f9fa;
    opacity: 0.7;
}

.notification-item.read:hover {
    opacity: 1;
}

.notification-item.read .notification-title {
    font-weight: 500;
}

/* Unread stays the same */
.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread .notification-title {
    font-weight: 600;
}