/* Custom Styles */
* {
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* a tooltip a teljes dokumentumhoz (body-hoz) képest legyen pozicionálva */
#wordTooltip {
  position: fixed;     /* viewporthoz igazodik */
  z-index: 9999;       /* mindig felül legyen */
}

/* Glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Info cards */
.info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

/* Premium buttons */
.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

.premium-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.premium-btn:hover:before {
    left: 100%;
}

.premium-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.premium-btn.primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -5px rgba(59, 130, 246, 0.4);
}

.premium-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.premium-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -5px rgba(255, 255, 255, 0.2);
}

.premium-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Count buttons */
.count-btn {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
}

.count-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.count-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.4);
}

/* Modern radio buttons */
.modern-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.modern-radio:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modern-radio input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.modern-radio input[type="radio"]:checked + .radio-custom {
    border-color: #3b82f6;
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.modern-radio input[type="radio"]:checked + .radio-custom:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Modern checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.modern-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modern-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #3b82f6;
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-custom:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Modern input */
.modern-input {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modern-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Stat cards */
.stat-card {
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

/* Feedback styles */
.feedback-correct {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.feedback-incorrect {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Word hover effects */
.word-hoverable {
    cursor: help;
    padding: 2px 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.word-hoverable:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Fordítható szavak alá halvány pontozás (a kérdésben használt span osztályához igazítva) */
.word-hoverable.has-translation {
  position: relative;
}

.word-hoverable.has-translation::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;          /* picit lejjebb, hogy ne ütközzön a betűkkel */
  height: 3px;
  background-image: radial-gradient(currentColor 20%, transparent 20%);
  background-size: 4px 3px;
  opacity: 0.35;
  pointer-events: none;
}

/* Modern select (illeszkedik a modern-input stílushoz) */
.modern-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.75rem; /* hely az ikon számára */
    background-image: url("data:image/svg+xml;utf8,\<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'>\<path d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.25 8.29a.75.75 0 01-.02-1.08z'/>\</svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
    cursor: pointer;
}

/* IE/Edge régi motorok */
.modern-select::-ms-expand { display: none; }

/* Legördülő lista színei (böngészőfüggő hatás) */
.modern-select option {
    background: rgba(135, 100, 166, 0.95); /* sötét háttér */
    color: #fff;
}

/* Hover/focus állapot a selectre – ugyanaz a fénygyűrű, mint az inputnál */
.modern-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Optgroup címek és opciók olvashatósága */
#sentencesFile optgroup {
  background: rgba(135, 100, 166, 0.95); /* sötét háttér */
  font-weight: 700;
  color: #e5e7eb;           /* világosabb szöveg */
  font-style: normal;
}

#sentencesFile option {
  padding: 4px 8px;         /* nagyobb kattintható terület */
}

/* Safari/Chrome eset: optgroup label kontraszt */
@supports selector(select:has(option)) {
  #sentencesFile optgroup[label] { 
    color: #f3f4f6;
  }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .premium-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .glass-card {
        margin: 16px;
        padding: 24px !important;
    }
    
    .modern-input {
        padding: 16px !important;
        font-size: 18px !important;
    }
}