/* Agykarbantarto.hu - Modern Design */

:root {
    /* Színpaletta a menu-hatter.svg alapján */
    --primary-color: #368eac;      /* Elsődleges kék (navigáció) */
    --secondary-color: #22b5cd;    /* Világosabb kék */
    --accent-color: #bdbdbd;       /* Pasztell szürke (gombok, kiemelések) */
    --accent-dark: #9e9e9e;        /* Sötétebb szürke */
    --accent-light: #e0e0e0;       /* Világosabb szürke */
    --success-color: #10b981;      /* Zöld success */
    --warning-color: #bdbdbd;      /* Pasztell szürke warning */
    --danger-color: #ef4444;       /* Piros */
    --info-color: #06b6d4;         /* Cyan */
    --light-color: #f8fafc;        /* Nagyon világos szürke */
    --dark-color: #1e293b;         /* Sötét szürke */
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --brain-color: #3b82f6;        /* Kék brain ikon */
    --quiz-color: #bdbdbd;         /* Pasztell szürke kvíz gombok */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    line-height: 1.6;
    color: var(--gray-800);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--dark-color);
}

.display-5 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #368eac, #22b5cd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Navigation */
.navbar {
    background: linear-gradient(135deg, #368eac 0%, #22b5cd 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(54, 142, 172, 0.1);
    z-index: 1;
}

.navbar > * {
    position: relative;
    z-index: 2;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.025em;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand i.fa-graduation-cap {
    font-size: 2rem;
    color: #22b5cd;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    font-weight: 700;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius);
    background: white;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    z-index: 1050;
    position: absolute;
}

.dropdown-item {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Kártya stílusok - halványszürke árnyék */
.article-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(54, 142, 172, 0.15), 0 4px 10px rgba(34, 181, 205, 0.1);
    border-color: rgba(54, 142, 172, 0.1);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #368eac 0%, #22b5cd 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover::before {
    opacity: 1;
}

.article-image {
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 0;
}

.article-card:hover .article-image {
    transform: scale(1.1);
}

.article-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

/* Kattintható kép linkek */
.card-img-top-link {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.card-img-top-link:hover {
    text-decoration: none;
}

.card-img-top-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(54, 142, 172, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-img-top-link:hover::after {
    opacity: 1;
}

.article-image-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 220px);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.card-title a:hover {
    color: #368eac;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Enhanced Badges */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #368eac, #22b5cd) !important;
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(54, 142, 172, 0.3);
}

.badge.bg-success {
    background: linear-gradient(135deg, #368eac, #22b5cd) !important;
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(54, 142, 172, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700)) !important;
    border: none;
    color: white;
}

/* Enhanced Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #368eac;
    border: 2px solid #368eac;
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #368eac, #22b5cd);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 142, 172, 0.3);
    border-color: #368eac;
}

.btn-primary {
    background: linear-gradient(135deg, #368eac, #22b5cd);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(54, 142, 172, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22b5cd, #368eac);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 142, 172, 0.4);
}

.btn i.fa-play {
    color: #368eac;
    margin-right: 0.5rem;
}

.btn-outline-primary i.fa-play {
    color: #368eac;
}

.btn-outline-primary:hover i.fa-play,
.btn-primary i.fa-play {
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: #368eac;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #22b5cd;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--gray-600);
    font-weight: 600;
}

/* Alert üzenetek */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, white 0%, var(--gray-100) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

/* Loading animáció */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #22b5cd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive betűméretek */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .article-image {
        height: 180px;
    }
    
    .article-image-placeholder {
        height: 180px;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    main.container {
        padding-top: 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Challenge quiz oldal mobil optimalizáció */
@media (max-width: 768px) {
    .challenge-header {
      padding: 1.5rem;
      margin-bottom: 1.5rem;
    }
    
    .challenge-stats {
      padding: 0.75rem;
    }
    
    .quiz-card {
      margin-bottom: 2rem;
    }
    
    .quiz-card .card-body {
      padding: 2rem 1.5rem;
    }
    
    .progress-ring {
      width: 60px;
      height: 60px;
    }
    
    .badge-preview {
      flex-direction: column;
      gap: 1rem;
    }
  }
  
  @media (max-width: 576px) {
    .challenge-header {
      padding: 1rem;
    }
    
    .challenge-header h1 {
      font-size: 1.5rem;
    }
    
    .challenge-stats .h4 {
      font-size: 1.25rem;
    }
    
    .quiz-card .card-body {
      padding: 1.5rem 1rem;
    }
    
    .quiz-card h3 {
      font-size: 1.5rem;
    }
    
    .trophy-icon, .coins-icon {
      font-size: 2rem !important;
    }
  }
/* Animációk */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Hover effektek */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    z-index: 1050;
    position: absolute;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

/* Footer Enhancement */
footer {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--dark-color) 100%);
    color: white;
    border-top: 1px solid var(--gray-700);
    margin-top: 4rem;
    padding: 2rem 0;
}

footer p {
    margin: 0;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* Pagination Styling */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    margin: 0 0.125rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 700;
}

/* Archive Page Enhancements */
.archive-stats {
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    text-align: center;
}

/* Egyéb javítások */
.text-decoration-none:hover {
    text-decoration: none !important;
}

.shadow-sm {
    box-shadow: var(--shadow) !important;
}

#subscribe-push {
  background: var(--accent-color, #f97316);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

/* A fixált állapotú gomb stílusa */
#subscribe-push.position-fixed {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  animation: fadeInButton 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

#subscribe-push:hover, #subscribe-push:focus {
  background: var(--accent-dark, #ea580c);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Fixált feliratkozás gomb stílusok */
#fixed-subscribe-push {
  background-color: #ffd600;
  color: #333;
  border: none;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 0.5rem;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
  transition: all 0.3s ease;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

#fixed-subscribe-push:hover {
  background-color: #ffe066;
  color: #222;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#fixed-subscribe-push:active {
  transform: translateY(-1px);
}

/* Offcanvas kvízoldalak menü stílusa */
.offcanvas {
    width: 320px !important;
    border: none;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.offcanvas-header {
    background: linear-gradient(135deg, #368eac, #22b5cd);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.offcanvas-body {
    padding: 0;
    background: #f8fafc;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 1.5rem;
    background: white;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: var(--gray-100);
    transform: translateX(8px);
    color: var(--primary-color);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item i.fa-graduation-cap {
    width: 24px;
    text-align: center;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Felhasználói profil megjelenítés a kvízoldalakon */
.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
}

.points {
    color: #bdbdbd;
    font-weight: bold;
}

/* Image Error Handling - Prevent Flashing */
.img-error {
    opacity: 0.7;
    filter: grayscale(50%);
    transition: opacity 0.3s ease;
}

/* Toplista specific fixes */
.user-avatar {
    background: var(--gray-200);
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
}

.user-avatar.img-error {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

/* Prevent layout shift during image loading */
.user-avatar[src] {
    min-height: 50px;
    min-width: 50px;
}

/* Smooth transitions for loading states */
img {
    transition: opacity 0.2s ease-in-out;
}

img[data-error-handled="true"] {
    opacity: 0.8;
}

/* Loading placeholder for images */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Kihívások oldal fejlesztett stílusok */
.challenge-alert-bar {
    background: linear-gradient(45deg, #ff9800, #ffc107);
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
}

.challenge-alert-bar:hover {
    background: linear-gradient(45deg, #f57c00, #ffb300);
}

.challenge-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.challenge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.challenge-card-active {
    border: 2px solid #28a745 !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.challenge-card-upcoming {
    border: 1px solid #6c757d !important;
    opacity: 0.75;
}

.challenge-card-upcoming:hover {
    transform: none;
    opacity: 0.85;
}

/* Mobilbarát optimalizációk */
@media (max-width: 768px) {
    .challenge-header {
      padding: 1.5rem;
      margin-bottom: 1.5rem;
    }
    
    .challenge-stats {
      padding: 0.75rem;
    }
    
    .quiz-card {
      margin-bottom: 2rem;
    }
    
    .quiz-card .card-body {
      padding: 2rem 1.5rem;
    }
    
    .progress-ring {
      width: 60px;
      height: 60px;
    }
    
    .badge-preview {
      flex-direction: column;
      gap: 1rem;
    }
  }
  
  @media (max-width: 576px) {
    .challenge-header {
      padding: 1rem;
    }
    
    .challenge-header h1 {
      font-size: 1.5rem;
    }
    
    .challenge-stats .h4 {
      font-size: 1.25rem;
    }
    
    .quiz-card .card-body {
      padding: 1.5rem 1rem;
    }
    
    .quiz-card h3 {
      font-size: 1.5rem;
    }
    
    .trophy-icon, .coins-icon {
      font-size: 2rem !important;
    }
  }
