/* ========================================
   SHARED STYLES CSS - AWSomecards
   Styles for all pages EXCEPT index.html
   ======================================== */

/* ========================================
   Reset and Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* User selection control */
.no-select * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --accent: #4ecdc4;
    --success: #00ff88;
    --danger: #ff6b6b;
    --warning: #ff9900;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-light: #e1e4e8;
    --border-lighter: #f0f0f0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Body and Background
   ======================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   Background Orbs and Decorations
   ======================================== */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.bg-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: -150px;
    left: -150px;
    animation: float-slow 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--success), transparent);
    bottom: -100px;
    right: -100px;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.cloud-decoration {
    position: fixed;
    opacity: 0.05;
    font-size: 100px;
    color: white;
    pointer-events: none;
    animation: drift 20s infinite ease-in-out;
}

.cloud-1 {
    top: 10%;
    left: -100px;
    animation-delay: 0s;
}

.cloud-2 {
    top: 60%;
    right: -100px;
    animation-delay: 10s;
}

/* ========================================
   Container Styles
   ======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease-out;
}

.page-container {
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 40px 20px;
    width: 100%;
    margin: 0 auto;
}

.content-wrapper {
    position: relative;
    z-index: 10;
}

.content-section {
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-align: left;
    color: white;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--accent);
}

.content-section h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    margin-top: 20px;
    color: #ffffff;
}

.content-section p {
    line-height: 1.8;
    margin-bottom: 15px;
    opacity: 0.95;
}

.content-section ul {
    list-style: none;
    padding: 0;
}

.content-section li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.content-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.content-section strong {
    color: var(--accent);
}

.content-section a {
    color: var(--accent);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* ========================================
   Headers and Titles
   ======================================== */
.header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    padding: 35px 25px;
    margin: -30px -30px 30px;
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    text-align: center;
}

.header h1 {
    font-size: clamp(1.6rem, 5vw, 2rem);
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 15px;
    display: block;
    animation: gradient-shift 4s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    line-height: 1.2;
}

.header p {
    color: #5a6c7d;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 500;
    margin-bottom: 20px;
    animation: fade-in 1s ease-out 0.3s both;
    line-height: 1.4;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--accent), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

/* ========================================
   NAVIGATION DRAWER STYLES
   ======================================== */

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 16px;
    width: 52px;
    height: 52px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.menu-toggle:hover::before {
    transform: translateX(100%);
}

.menu-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.hamburger-icon {
    color: white;
    font-size: 28px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.menu-toggle:hover .hamburger-icon {
    transform: rotate(90deg);
}

.menu-toggle.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.3) rotate(-180deg);
}

/* Navigation Drawer */
.nav-drawer {
    position: fixed;
    top: 0;
    left: -340px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff, #f8f9fc);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.nav-drawer.open {
    left: 0;
}

/* Custom Scrollbar */
.nav-drawer::-webkit-scrollbar {
    width: 6px;
}

.nav-drawer::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nav-drawer::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 3px;
}

/* Navigation Header */
.nav-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate-slow 20s linear infinite;
}

.nav-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Deck Navigation */
.deck-nav {
    flex: 1;
    padding: 20px 0;
    background: linear-gradient(180deg, #f8f9fc, #ffffff);
}

.deck-link {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 18px;
    margin: 0 15px 8px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.deck-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.deck-link:hover::before {
    transform: scaleY(1);
}

.deck-link:hover:not(.coming-soon):not(.active) {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.deck-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

.deck-link.active::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    animation: rotate-slow 15s linear infinite;
}

.deck-link.active:hover {
    transform: scale(1.04) translateX(2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Deck Icons */
.deck-icon {
    font-size: 32px;
    min-width: 45px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.deck-link:hover .deck-icon {
    transform: scale(1.15) rotate(-5deg);
}

.deck-link.active .deck-icon {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    animation: icon-pulse 2s ease-in-out infinite;
}

/* Deck Info */
.deck-info {
    flex: 1;
}

.deck-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.deck-info small {
    opacity: 0.7;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.deck-link.active .deck-info strong,
.deck-link.active .deck-info small {
    color: white;
}

/* Coming Soon Style */
.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.02) 10px,
            rgba(0, 0, 0, 0.02) 20px);
}

.coming-soon:hover {
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.02) 10px,
            rgba(0, 0, 0, 0.02) 20px);
    transform: none;
    box-shadow: none;
}

.coming-soon .deck-info small {
    color: #ff6b6b;
    font-weight: 600;
    font-style: italic;
}

/* Badge Styles */
.badge-new {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: badge-pulse 2s ease-in-out infinite;
}

/* Navigation Footer */
.nav-footer {
    padding: 20px;
    border-top: 2px solid #e8ecf1;
    background: linear-gradient(180deg, #ffffff, #f8f9fc);
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.08));
    border: 2px solid #667eea;
    border-radius: 12px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.home-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.7));
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Flash Card Styles
   ======================================== */
.card-container {
    margin-bottom: 35px;
    perspective: 1000px !important;
    -webkit-perspective: 1000px !important;
    height: 440px;
    position: relative;
    z-index: 100;
}

.flash-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 15px;
    z-index: 100;
}

.flash-card.flipped {
    transform: rotateY(180deg) !important;
}

.card-face {
    position: absolute !important;
    width: 100%;
    height: 100%;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: 100;
}

.card-front {
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    background-size: 200% 200%;
    color: white;
    transform: rotateY(0deg) !important;
    z-index: 102;
    animation: gradient-wave 8s ease infinite;
}

.card-back {
    background: linear-gradient(135deg, #f093fb, #f5576c, #f093fb);
    background-size: 200% 200%;
    color: white;
    transform: rotateY(180deg) !important;
    z-index: 101;
    animation: gradient-wave 8s ease infinite reverse;
    text-align: center;
    /* Centers the answer block */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-front::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate-slow 20s linear infinite;
    z-index: 101;
    pointer-events: none;
}

.card-content {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 110;
    /* Better mobile scrolling */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.card-question {
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 15px;
    color: white;
}

.card-answer {
    font-size: .95em;
    line-height: 1.3;
    text-align: left;
    color: white;
    white-space: pre-line;
    /* Add this for line breaks */
    max-width: 600px;
    /* Add this to control width */
    margin: 0 auto;
    /* Add this to center the block */
    display: block;
    /* Add this to make margin auto work */
    padding: 0 20px;
    /* Add horizontal padding */
    width: 90%;
    /* Set a consistent width */
    max-width: 500px;
    /* Limit maximum width */
}

.card-face strong {
    font-weight: bold;
    color: white;
}

.card-face br {
    display: block;
    margin: 0.5em 0;
    content: "";
}

#card-category {
    position: absolute;
    top: 15px;
    left: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 120;
    color: white;
}

/* Add after #card-category styles around line 520 */
.card-tier-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 120;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tier-badge-icon {
    font-size: 14px;
}

/* Different visual styles for each tier */
.tier-1 .card-tier-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.25));
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.tier-2 .card-tier-badge {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(169, 169, 169, 0.25));
    border: 1px solid rgba(192, 192, 192, 0.4);
}

.tier-3 .card-tier-badge {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(184, 115, 51, 0.25));
    border: 1px solid rgba(205, 127, 50, 0.4);
}

/* Study Mode Selector Styles */
.study-mode-selector {
    background: rgba(248, 249, 250, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.study-mode-selector label {
    display: block;
    margin-bottom: 12px;
    /* pushes buttons down */
    font-weight: 600;
    color: #586069;
}

.study-mode-btn {
    background: white;
    border: 2px solid var(--border-light);
    color: #586069;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.study-mode-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.1);
    border-color: var(--primary);
    background: #f8f9fa;
}

.study-mode-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.2);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--danger), #ee5a52);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #45b7aa, #3fa099);
}

.btn-secondary {
    background: linear-gradient(45deg, var(--accent), #44a08d);
    color: white;
    border: 2px solid transparent;
}

.btn-info {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

/* Control Buttons */
.controls {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.8));
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ========================================
   Category Filter
   ======================================== */
.category-filter {
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-btn {
    background: white;
    border: 2px solid var(--border-light);
    color: #586069 !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-size: 12px;
}

.category-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.15);
    border-color: var(--primary);
    background: #f8f9fa;
    color: var(--primary) !important;
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.25);
}

.category-btn.active:hover {
    color: white !important;
}

/* ========================================
   Progress Bar
   ======================================== */
.progress {
    background: #f6f8fa;
    border: 1px solid var(--border-light);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar-outer {
    background: #dfe2e5;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex: 1;
    margin: 0 15px;
}

#progress-fill {
    background: linear-gradient(90deg, var(--accent), #44a08d);
    height: 10px;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s linear infinite;
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
    gap: 20px;
}

.stats::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.08), transparent);
    animation: rotate-slow 30s linear infinite;
    pointer-events: none;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
    animation: number-pulse 2s ease-in-out infinite;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Social Media Buttons - UPDATED
   ======================================== */
.social-share {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 16px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Icon-only display on small screens */
@media (max-width: 480px) {
    .social-btn {
        padding: 12px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
        font-size: 0;
    }

    .social-btn::before {
        font-size: 20px;
        line-height: 1;
    }

    /* Add icons using pseudo-elements */
    .social-twitter::before {
        content: "𝕏";
        font-size: 18px;
        font-weight: bold;
    }

    .social-linkedin::before {
        content: "in";
        font-size: 16px;
        font-weight: bold;
    }

    .social-facebook::before {
        content: "f";
        font-size: 20px;
        font-weight: bold;
    }

    .social-reddit::before {
        content: "R";
        font-size: 18px;
        font-weight: bold;
    }
}

/* Compact text on medium screens */
@media (min-width: 481px) and (max-width: 768px) {
    .social-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 5px;
    }
}

.social-twitter {
    background: #1DA1F2;
}

.social-linkedin {
    background: #0077B5;
}

.social-facebook {
    background: #4267B2;
}

.social-reddit {
    background: #FF4500;
}

/* Alternative approach using shorter labels for ALL screen sizes */
/* Uncomment this section if you prefer shorter labels everywhere */

/* Mobile specific styles */
@media (max-width: 768px) {
    .social-share {
        gap: 8px;
    }

    .social-btn {
        padding: 12px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        position: relative;
        /* Hide text */
        font-size: 0 !important;
        color: transparent !important;
    }

    /* Remove any child text elements */
    .social-btn * {
        display: none !important;
    }

    /* Add icons using pseudo-elements */
    .social-btn::after {
        display: block !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 20px;
        line-height: 1;
        font-weight: bold;
    }

    .social-twitter::after {
        content: "𝕏";
        font-size: 18px;
    }

    .social-linkedin::after {
        content: "in";
        font-size: 16px;
        font-family: Arial, sans-serif;
    }

    .social-facebook::after {
        content: "f";
        font-size: 22px;
        font-family: Arial, sans-serif;
    }

    .social-reddit::after {
        content: "R";
        font-size: 18px;
        font-family: Arial, sans-serif;
    }
}

/* ========================================
   Support Section
   ======================================== */
.support-section {
    margin-top: 20px;
    text-align: center;
    animation: fade-in 1s ease-out 0.5s both;
}

.coffee-button {
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    animation: coffee-float 3s ease-in-out infinite;
}

.coffee-button:hover {
    transform: translateY(-3px) scale(1.08);
    filter: brightness(1.1);
    animation-play-state: paused;
}

/* ========================================
   Footer - Clean and Centered (All Variations)
   ======================================== */
.footer,
footer {
    text-align: center;
    margin: 30px 0 0 0;
    padding: 20px 0;
    border-top: none;
    color: var(--text-secondary);
    font-size: 0.9em;
    width: 100%;
    display: block;
    clear: both;
    position: relative;
}

.footer p,
footer p {
    text-align: center;
    margin: 0 auto;
    padding: 0;
    line-height: 1.6;
    max-width: 100%;
}

.footer p+p {
    margin-top: 10px;
}

.footer a,
footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover,
footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* About page footer styles */
.footer-message {
    text-align: center;
    margin: 30px auto 15px;
    padding: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.footer-links {
    text-align: center;
    margin: 20px auto 0;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    line-height: 1.8;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Container-specific footer styles */
.container .footer,
.container footer {
    margin: 30px 0 0 0;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 0 0 20px 20px;
    background: rgba(248, 249, 250, 0.5);
    position: relative;
}
.container .footer::before,
.container footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    border-top: 1px solid #e0e0e0;
}
/* Mobile adjustments */
@media (max-width: 768px) {
    body {
        margin: 0;  /* Ensure no default margin */
        padding: 0;  /* Your padding */
    }
    .container .footer,
    .container footer {
        margin-left: 0;
        margin-right: 0;
        margin-top: 20px;
        padding: 15px 0;
        border-top: 1px solid #e0e0e0;
    }

    .container .footer::before,
    .container footer::before {
        display: none;
    }

    .footer,
    footer {
        font-size: 0.8em;
        padding: 15px 0;
    }

    .footer-message {
        font-size: 0.85em;
        padding: 12px;
        margin: 20px auto 10px;
    }

    .footer-links {
        font-size: 0.8em;
        padding: 15px;
    }
}

/* ========================================
   Loading Overlay
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h2 {
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* ========================================
   Misc Components
   ======================================== */
.keyboard-shortcuts {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-secondary);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08);
}

.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.seo-keywords {
    font-size: 0.1px;
    color: transparent;
}

/* Icon animations */
.network-icon {
    display: inline-block;
    font-size: 1em;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: network-pulse 3s ease-in-out infinite;
}

.cloud-icon {
    display: inline-block;
    font-size: 1em;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: cloud-float 3s ease-in-out infinite;
}

.architect-icon {
    display: inline-block;
    font-size: 1em;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: architect-build 3s ease-in-out infinite;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes gradient-wave {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes drift {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(100px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-slow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes number-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes coffee-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes network-pulse {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-3px) rotate(3deg);
    }
}

@keyframes cloud-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-3px) rotate(3deg);
    }
}

@keyframes architect-build {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-3px) rotate(3deg);
    }
}

@keyframes icon-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        margin: 10px;
        /* No extra bottom padding needed */
    }

    .page-container {
        padding: 20px 10px;
    }

    .content-section {
        padding: 20px;
    }

    .header {
        padding: 25px 15px;
        margin: -20px -20px 20px;
    }

    /* Horizontal scroll for category filters */
    .category-filter {
        padding: 10px 5px;
        margin-bottom: 15px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        min-height: 120px;
        max-height: 150px;
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
    }

    .category-filter::after {
        display: none;
    }
    
    /* Add gradient fade to indicate more content */
    .category-filter::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20px;
        background: linear-gradient(to bottom, transparent, rgba(248, 249, 250, 0.9));
        pointer-events: none;
        z-index: 1;
    }

    .category-btn {
        flex: 0 0 auto;  /* Let buttons size naturally */
        scroll-snap-align: start;
        font-size: 11px;
        padding: 8px 14px;
        min-width: fit-content;  /* Size to content */
    }

    /* Horizontal scroll for study mode buttons */
    .study-mode-selector {
        padding: 10px 5px;
        margin-bottom: 15px;
    }

    .study-mode-buttons {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        flex-wrap: nowrap;
        margin-top: 12px;
    }

    .study-mode-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        font-size: 11px;
        padding: 8px 12px;
        min-width: fit-content;
    }

    /* Add subtle scroll indicators */
    .category-filter::after,
    .study-mode-buttons::after {
        content: '›';
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 20px;
        pointer-events: none;
        opacity: 0.5;
    }

    /* Controls positioned below card */
    /* Controls positioned below card */
    .controls {
        background: linear-gradient(135deg, rgba(248, 249, 250, 0.9), rgba(255, 255, 255, 0.9));
        padding: 15px 10px;
        border-radius: 15px;
        margin-bottom: 20px;
        margin-top: -10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Top row with navigation buttons */
    .controls-nav {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    /* Bottom row with flip button */
    .controls-flip {
        width: 100%;
    }

    .controls .btn {
        padding: 10px 8px;
        font-size: 11px;
        border-radius: 20px;
        letter-spacing: 0;
    }

    #flip-btn {
        width: 100%;
        padding: 14px;
        font-size: 13px;
        font-weight: 600;
    }

    #shuffle-btn {
        display: inline-block !important;
        /* Show shuffle on mobile */
    }
}

/* Compact progress bar */
.progress {
    padding: 10px;
    font-size: 11px;
    margin-bottom: 15px;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-outer {
    width: 100%;
    margin: 0;
    height: 6px;
}

.progress>span {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Smaller card on mobile */
.card-container {
    height: 325px;
    margin-bottom: 20px;
}

.card-face {
    padding: 20px;
}

.card-question {
    font-size: 1.1em;
}

#card-answer {
    white-space: pre-line;
    text-align: left;
    display: inline-block;
    margin: 0 auto;
}

#card-category {
    top: 10px;
    left: 15px;
    font-size: 10px;
    padding: 4px 10px;
}

.card-tier-badge {
    top: 10px;
    right: 15px;
    padding: 3px 8px;
    font-size: 9px;
}

.tier-badge-icon {
    font-size: 12px;
}

/* Better mobile scrolling for card content */
.card-content {
    padding-right: 10px;
    scrollbar-width: thick;
}

.card-content::-webkit-scrollbar {
    width: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.card-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stats adjustments */
.stats {
    padding: 20px 15px;
    gap: 15px;
}

.stat-number {
    font-size: 1.5em;
}

.stat-label {
    font-size: 0.8em;
}

/* Navigation drawer mobile adjustments */
.menu-toggle {
    width: 46px;
    height: 46px;
    top: 15px;
    left: 15px;
}

.nav-drawer {
    width: 85%;
    max-width: 320px;
}

.deck-link {
    padding: 16px 20px;
    margin: 0 12px 6px;
}

.deck-icon {
    font-size: 28px;
    min-width: 40px;
}

.nav-header {
    min-height: 100px;
    padding: 20px;
}

.nav-header h3 {
    font-size: 1.2rem;
}

/* Hide background orbs on mobile */
.bg-orb {
    display: none;
}

/* Smaller keyboard shortcuts */
.keyboard-shortcuts {
    font-size: 0.75em;
    padding: 10px;
}

/* Social buttons adjustments */
.social-btn {
    font-size: 12px;
    padding: 6px 15px;
}