:root {
    --primary-color: #1173d4;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    touch-action: manipulation; /* Prevents double-tap zoom on mobile */
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Newsreader', serif;
}
.greek-text {
    font-family: 'Noto Serif', serif;
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; /* 40px */
}
.prose-text {
    font-family: 'Noto Serif', serif;
}
.btn {
    @apply px-4 py-2 rounded-lg font-semibold text-white transition-transform transform active:scale-95 shadow-md;
}
.srs-btn {
    @apply flex-1 px-8 py-3 text-sm font-bold text-white transition-all duration-150 ease-in-out focus:outline-none focus:ring-3 focus:ring-offset-2;
    height: 3rem;
    border-radius: 25px;
    position: relative;
    background: linear-gradient(135deg, var(--btn-color-light), var(--btn-color-dark));
    border: 2px solid var(--btn-border);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.srs-btn:hover {
    background: linear-gradient(135deg, var(--btn-color-hover-light), var(--btn-color-hover-dark));
    transform: translateY(-1px);
    border-color: var(--btn-border-hover);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15);
}
.srs-btn:active {
    transform: translateY(1px);
    background: linear-gradient(135deg, var(--btn-color-dark), var(--btn-color-pressed));
    border-color: var(--btn-border-active);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.2);
}

.srs-btn-again {
    --btn-color-light: #f87171;
    --btn-color-dark: #dc2626;
    --btn-color-hover-light: #ef4444;
    --btn-color-hover-dark: #b91c1c;
    --btn-color-pressed: #991b1b;
    --btn-border: #dc2626;
    --btn-border-hover: #b91c1c;
    --btn-border-active: #7f1d1d;
}

.srs-btn-hard {
    --btn-color-light: #fb923c;
    --btn-color-dark: #ea580c;
    --btn-color-hover-light: #f97316;
    --btn-color-hover-dark: #c2410c;
    --btn-color-pressed: #9a3412;
    --btn-border: #ea580c;
    --btn-border-hover: #c2410c;
    --btn-border-active: #7c2d12;
}

.srs-btn-good {
    --btn-color-light: #60a5fa;
    --btn-color-dark: #2563eb;
    --btn-color-hover-light: #3b82f6;
    --btn-color-hover-dark: #1d4ed8;
    --btn-color-pressed: #1e40af;
    --btn-border: #2563eb;
    --btn-border-hover: #1d4ed8;
    --btn-border-active: #1e3a8a;
}

.srs-btn-easy {
    --btn-color-light: #34d399;
    --btn-color-dark: #059669;
    --btn-color-hover-light: #10b981;
    --btn-color-hover-dark: #047857;
    --btn-color-pressed: #065f46;
    --btn-border: #059669;
    --btn-border-hover: #047857;
    --btn-border-active: #064e3b;
}
.flip-card {
    perspective: 1000px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: white;
    border: 3px solid #d1d5db;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.flip-card:hover .flip-card-front, .flip-card:hover .flip-card-back {
    border-color: #60a5fa;
    box-shadow: 0 25px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.flip-card-back {
    transform: rotateY(180deg);
}
 /* For the selection highlight in case mode */
.highlight {
    background-color: #fef08a; /* yellow-200 */
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border-radius: 0.25rem;
    font-weight: bold;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}
.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    line-height: 1.2;
}
.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
}
.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Header styles */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}
.nav-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}
.nav-dropdown-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

/* Mobile navigation styles */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e6e8eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.mobile-menu.show {
    display: block;
}
.mobile-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}
.mobile-menu-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}
.mobile-menu-item.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 500;
}

/* Landing Page Styles */
.landing-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    overflow-x: hidden;
    width: 100%;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    width: 100%;
    height: 0.75rem;
    background-color: #e7ebf3;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
    border-radius: 9999px;
    transition: width 0.6s ease;
}

.study-mode-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    min-width: 0; /* Prevents grid items from overflowing */
    max-width: 100%;
}

.study-mode-card-body {
    padding: 1.5rem;
}

.study-mode-card-footer {
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.start-button {
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: #e7ebf3;
    color: #0d121b;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.start-button:hover {
    background-color: #d1d5db;
}

.start-button-primary {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
}

.start-button-primary:hover {
    background: linear-gradient(135deg, #0c4fb3, #1d4ed8);
}

.landing-hidden {
    display: none;
}

.landing-visible {
    display: block;
}

/* Study mode container - centered layout for study content */
#studyArea:not(.landing-mode) {
    max-width: 48rem; /* 768px - equivalent to max-w-2xl */
    margin: 0 auto;
    padding: 1rem;
    align-items: center;
    justify-content: center;
}

#studyArea.landing-mode {
    max-width: none;
    padding: 0;
}

/* Icon circles for landing page cards */
.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.icon-blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.icon-purple {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    color: #7c3aed;
}

.icon-green {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.icon-teal {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0f766e;
}

.icon-amber {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.icon-orange {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    color: #c2410c;
}

/* Card accent borders */
.card-accent-left {
    border-left-width: 4px;
}

.border-l-blue {
    border-left-color: #3b82f6;
}

.border-l-purple {
    border-left-color: #8b5cf6;
}

.border-l-green {
    border-left-color: #10b981;
}

.border-l-teal {
    border-left-color: #14b8a6;
}

.border-l-amber {
    border-left-color: #f59e0b;
}

.border-l-orange {
    border-left-color: #f97316;
}
