[x-cloak] { display: none !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.cursor-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    transition: none;
}

html {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100%;
}

body {
    font-family: 'Georgia', serif;
    background: transparent;
    color: #e4e4e7;
    min-height: 100vh;
    padding: 20px;
    cursor: default;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
    position: relative;
}

header h1 {
    font-size: 2em;
    color: #a855f7;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1em;
    color: #94a3b8;
    font-style: italic;
}

.admin-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.3em;
    text-decoration: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    border: 2px solid #f59e0b;
}

.admin-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.7);
}

.search-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #475569;
    border-radius: 10px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid #475569;
    border-radius: 8px;
    color: #e4e4e7;
    font-family: 'Georgia', serif;
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.search-input::placeholder {
    color: #64748b;
}

.search-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid #475569;
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    font-family: 'Georgia', serif;
    font-size: 0.9em;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin: 0;
}

.filter-btn:hover {
    border-color: #a855f7;
    color: #e4e4e7;
}

.filter-btn.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    color: #a855f7;
    font-weight: bold;
}

.filter-btn.facile.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.filter-btn.intermédiaire.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
}

.filter-btn.difficile.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.filter-btn.favoris.active {
    background: rgba(250, 204, 21, 0.15);
    border-color: #facc15;
    color: #facc15;
}

.no-results {
    text-align: center;
    color: #64748b;
    font-style: italic;
    font-size: 1.1em;
    padding: 40px 20px;
}

.potions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.potion-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: cardAppear 0.4s ease both;
    will-change: transform;
}

.potion-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg, #1e1b4b, #1a1040, #1e293b);
    border-color: #a855f7;
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.25), 0 0 15px rgba(168, 85, 247, 0.15);
}

.potion-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

.potion-card h3 {
    font-size: 1.3em;
    color: #f1f5f9;
    text-align: center;
    margin-bottom: 10px;
}

.difficulty {
    text-align: center;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
    width: 100%;
}

.difficulty.facile { background: #22c55e; color: #000; }
.difficulty.intermédiaire { background: #f59e0b; color: #000; }
.difficulty.difficile { background: #ef4444; color: #fff; }

.potion-preview {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    text-align: center;
    color: #a855f7;
    font-weight: bold;
}

.card-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.potion-card:hover .card-arrow {
    transform: translateX(8px);
}

.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.4em;
    color: #475569;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.25s ease;
    padding: 4px;
    margin: 0;
    line-height: 1;
    z-index: 2;
}

.fav-btn:hover {
    color: #facc15;
    transform: scale(1.2);
}

.fav-btn.active {
    color: #facc15;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
}

.potions-counter {
    text-align: center;
    color: #94a3b8;
    font-size: 0.95em;
    margin-bottom: 8px;
    font-style: italic;
}

.back-btn-top {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 2px solid #a855f7;
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
    font-weight: bold;
}

.back-btn-top:hover {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    transform: translateX(-5px);
    box-shadow: 0 7px 20px rgba(168, 85, 247, 0.5);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

:root {
    --accent: #a855f7;
    --accent-glow-1: rgba(168, 85, 247, 0.1);
    --accent-glow-3: rgba(168, 85, 247, 0.3);
    --accent-glow-5: rgba(168, 85, 247, 0.5);
    --accent-glow-6: rgba(168, 85, 247, 0.6);
}

.potion-detail {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    animation: slideInLeft 0.5s ease both;
}

.potion-header {
    display: flex;
    gap: 20px;
    align-items: center;
}

@keyframes levitate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.potion-icon-large {
    font-size: 5em;
    filter: drop-shadow(0 0 20px var(--accent-glow-6));
    animation: levitate 3s ease-in-out infinite;
    will-change: transform;
}

.potion-info h1 {
    font-size: 1.8em;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.potion-warning {
    font-size: 0.5em;
    font-weight: bold;
    padding: 6px 16px;
    border: 2px solid;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 12px currentColor;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.difficulty-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 1em;
    margin-bottom: 20px;
}

.potion-description {
    font-size: 1.2em;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.effects-box {
    background: var(--accent-glow-1);
    border-left: 4px solid var(--accent);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.share-icon-btn {
    background: none;
    border: none;
    font-size: 0.45em;
    cursor: pointer;
    opacity: 0.4;
    transition: transform 0.25s ease, opacity 0.25s ease;
    padding: 2px;
    margin: 0;
    vertical-align: middle;
}

.share-icon-btn:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.share-icon-btn.copied {
    opacity: 1;
}

.recipe-section {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.recipe-section h2 {
    font-size: 1.5em;
    color: var(--accent);
    margin-bottom: 15px;
    text-align: center;
}

.recipe-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.recipe-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-ingredients {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--accent-glow-3);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
    animation: fadeInUp 0.5s ease 0.4s both;
}

.recipe-ingredients h3 {
    color: var(--accent);
    font-size: 1.2em;
    margin-bottom: 14px;
    text-align: center;
    text-shadow: 0 0 12px var(--accent-glow-5);
}

.ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.5);
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #475569;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ingredient-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-left-color: var(--accent);
}

.ingredient-icon { font-size: 1.4em; flex-shrink: 0; }
.ingredient-name { color: #cbd5e1; font-size: 0.95em; flex: 1; }
.ingredient-qty  { color: #f59e0b; font-weight: bold; font-size: 0.95em; flex-shrink: 0; }

.recipe-step {
    display: grid;
    grid-template-columns: 70px 40px 1fr;
    gap: 15px;
    align-items: center;
    background: rgba(30, 41, 59, 0.5);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    transition: transform 0.3s ease, background 0.3s ease;
    animation: fadeInUp 0.35s ease both;
}

.recipe-step:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(5px);
}

.step-time        { font-weight: bold; color: #f59e0b; font-size: 1.1em; }
.step-icon        { font-size: 1.5em; }
.step-description { color: #cbd5e1; font-size: 1.1em; }

.action-section {
    text-align: center;
    padding: 30px;
    animation: fadeInUp 0.5s ease 0.6s both;
}

.potion-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease 0.7s both;
}

.potion-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #475569;
    border-radius: 12px;
    text-decoration: none;
    color: #cbd5e1;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    max-width: 48%;
}

.potion-nav-btn:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.potion-nav-btn.next { margin-left: auto; text-align: right; }

.nav-arrow {
    font-size: 1.5em;
    color: #a855f7;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.potion-nav-btn.prev:hover .nav-arrow { transform: translateX(-5px); }
.potion-nav-btn.next:hover .nav-arrow { transform: translateX(5px); }

.nav-label { display: flex; flex-direction: column; gap: 2px; }
.nav-label small  { font-size: 0.8em; color: #64748b; }
.nav-label strong { font-size: 1em; color: #e4e4e7; }

.btn-primary {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.6);
}

.simulator-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.simulator-modal.active { display: flex; }

.simulator-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #a855f7;
    border-radius: 20px;
    padding: 40px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.5);
}

.close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: #ef4444;
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.close-btn:hover { background: #dc2626; transform: rotate(90deg); }

.simulator-header { text-align: center; margin-bottom: 15px; }
.simulator-header h2 { font-size: 1.5em; color: #a855f7; margin-bottom: 10px; }

.timer-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #f59e0b;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    border: 2px solid #f59e0b;
    transition: color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.timer-display.timer-warning {
    color: #fb923c; border-color: #fb923c;
    box-shadow: 0 0 14px rgba(251, 146, 60, 0.45);
    animation: timerPulse 1.4s ease-in-out infinite;
}

.timer-display.timer-danger {
    color: #ef4444; border-color: #ef4444;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.55);
    animation: timerPulse 0.75s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.06); }
}

.simulator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
    align-items: center;
}

.simulator-main.pre-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cauldron-area { display: flex; justify-content: center; align-items: center; }

.cauldron {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cauldron-flames {
    min-height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

@keyframes flameWiggle {
    0%, 100% { transform: scaleY(1) rotate(-4deg); }
    25%       { transform: scaleY(1.12) rotate(4deg); }
    50%       { transform: scaleY(0.9) rotate(-3deg); }
    75%       { transform: scaleY(1.18) rotate(3deg); }
}

.flame {
    display: inline-block;
    animation: flameWiggle 0.35s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 100, 0, 0.9));
    line-height: 1;
}

.flame:nth-child(2) { animation-delay: 0.12s; }
.flame:nth-child(3) { animation-delay: 0.24s; }
.flame-s { font-size: 1.8em; }
.flame-m { font-size: 2.2em; }
.flame-l { font-size: 2.8em; }

.cauldron-icon {
    font-size: 4em;
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.7));
    line-height: 1;
    width: 1em; height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
}

.cauldron-icon svg { width: 100%; height: 100%; max-width: 64px; max-height: 64px; }

.cauldron-ingredients {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 180px;
    min-height: 28px;
}

.cauldron-ing-icon {
    font-size: 1.3em;
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
    cursor: default;
    transition: transform 0.15s ease;
}

.cauldron-ing-icon:hover { transform: scale(1.25); }

.fire-container {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #475569;
}

.fire-indicator { color: #94a3b8; font-size: 1.2em; }

.controls-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.control-btn {
    background: linear-gradient(135deg, #475569, #334155);
    color: white;
    border: 2px solid #64748b;
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.btn-fire        { border-left: 4px solid #f97316; }
.btn-ingredient  { border-left: 4px solid #22c55e; }
.btn-stir        { border-left: 4px solid #3b82f6; }
.btn-incantation { border-left: 4px solid #a855f7; }

.btn-fire:hover        { background: linear-gradient(135deg, #7c2d12, #9a3412); border-color: #f97316; box-shadow: 0 0 14px rgba(249,115,22,0.4); }
.btn-ingredient:hover  { background: linear-gradient(135deg, #14532d, #166534); border-color: #22c55e; box-shadow: 0 0 14px rgba(34,197,94,0.4); }
.btn-stir:hover        { background: linear-gradient(135deg, #1e3a5f, #1e40af); border-color: #3b82f6; box-shadow: 0 0 14px rgba(59,130,246,0.4); }
.btn-incantation:hover { background: linear-gradient(135deg, #4a1d96, #6d28d9); border-color: #a855f7; box-shadow: 0 0 14px rgba(168,85,247,0.4); }

.control-btn:hover {
    background: linear-gradient(135deg, #64748b, #475569);
    transform: translateX(5px);
    border-color: #a855f7;
}

.finish-btn { background: linear-gradient(135deg, #22c55e, #16a34a); border-color: #22c55e; }
.finish-btn:hover { background: linear-gradient(135deg, #16a34a, #15803d); }

.action-panel {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #a855f7;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    min-height: 80px;
}

.fire-control, .ingredient-control, .stir-control, .incantation-control { text-align: center; }

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 2px solid #475569;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: -15px -15px 20px -15px;
    border-radius: 10px 10px 0 0;
}

.action-header h3 { color: #a855f7; font-size: 1.5em; margin: 0; }

.action-timer {
    font-size: 1.8em;
    font-weight: bold;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #f59e0b;
    min-width: 100px;
    text-align: center;
}

.fire-control h3, .ingredient-control h3, .stir-control h3, .incantation-control h3 {
    color: #a855f7;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.action-buttons { display: flex; gap: 15px; justify-content: center; margin-top: 20px; }

.btn-secondary {
    background: #475569;
    color: white;
    border: 2px solid #64748b;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn-secondary:hover { background: #64748b; transform: scale(1.05); }

.fire-bar-container {
    width: 100%;
    height: 40px;
    background: #1e293b;
    border-radius: 20px;
    overflow: hidden;
    margin: 20px 0;
    border: 2px solid #475569;
}

.fire-bar {
    height: 100%;
    width: 0%;
    background: #ff8c00;
    transition: width 0.1s ease, background-color 0.3s ease, filter 0.08s ease;
}

.fire-level-indicator { font-size: 1.3em; color: #f59e0b; font-weight: bold; margin: 15px 0; }

.fire-timer {
    font-size: 1.5em;
    color: #ef4444;
    font-weight: bold;
    margin: 15px 0;
    background: rgba(239, 68, 68, 0.2);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #ef4444;
}

.warning-text { color: #f59e0b; font-weight: bold; font-size: 0.9em; margin: 10px 0; text-align: center; }

.ingredient-selection {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.available-ingredients, .selected-ingredients {
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #475569;
    min-height: 300px;
    max-height: 350px;
    overflow-y: auto;
}

.middle-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
}

.middle-buttons button { padding: 20px 15px; font-size: 0.9em; white-space: normal; min-width: 120px; line-height: 1.4; border-radius: 10px; }

.available-ingredients h4, .selected-ingredients h4 { color: #a855f7; margin-bottom: 15px; text-align: center; }

.ing-icon { font-size: 1.5em; }

.selected-item {
    background: rgba(168, 85, 247, 0.2);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #a855f7;
    position: relative;
}

.ingredient-count {
    position: absolute;
    top: -8px; left: -8px;
    background: #f59e0b;
    color: #000;
    font-weight: bold;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 12px;
    border: 2px solid #1a1a2e;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.ingredient-info { flex: 1; }

.selected-item button { background: #ef4444; color: white; border: none; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.selected-item button:hover { background: #dc2626; }

.empty-msg { color: #64748b; text-align: center; padding: 20px; font-style: italic; }

.stir-top-actions { display: flex; justify-content: space-between; align-items: center; margin: 15px 0; padding: 0 20px; }
.stir-top-actions p { margin: 0; flex: 1; }
.stir-buttons-top { display: flex; gap: 10px; }
.stir-buttons-top .btn-primary, .stir-buttons-top .btn-secondary { padding: 10px 25px; font-size: 1em; }

.stir-layout { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 20px 0; }

.counter-side {
    background: rgba(168, 85, 247, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #a855f7;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.counter-side.left { order: 1; }
.counter-side.right { order: 3; }
.stir-interactive { display: flex; justify-content: center; order: 2; }

#stirCanvas {
    border: 3px solid #a855f7;
    border-radius: 15px;
    cursor: grab;
    background: #0f172a;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

#stirCanvas:active { cursor: grabbing; }

.counter-label { color: #cbd5e1; font-size: 1.1em; margin-right: 10px; }
.counter-value { color: #f59e0b; font-size: 1.5em; font-weight: bold; }

#incantationCanvas {
    background: #0f172a;
    border: 2px solid #a855f7;
    border-radius: 10px;
    cursor: crosshair;
    margin: 10px auto;
    display: block;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    max-width: 100%;
    height: auto;
}

.confirm-message {
    background: #22c55e;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

#incantationResult { min-height: 60px; margin: 15px 0; }

.incantation-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    border: 2px solid #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    animation: pulse 1s ease-in-out;
}

.incantation-failed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    border: 2px solid #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.result-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-modal.show { opacity: 1; }

.result-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.result-modal.show .result-content { transform: scale(1); }
.success-content { border: 3px solid #22c55e; box-shadow: 0 0 40px rgba(34, 197, 94, 0.5); }
.failure-content { border: 3px solid #ef4444; box-shadow: 0 0 40px rgba(239, 68, 68, 0.5); }

.success-icon { position: relative; font-size: 6em; margin-bottom: 20px; animation: bounce 1s ease infinite; }
.failure-icon { position: relative; font-size: 6em; margin-bottom: 20px; animation: shake 0.5s ease; }

.potion-bottle { display: inline-block; animation: float 3s ease-in-out infinite; }
.potion-broken { display: inline-block; }

.sparkles {
    position: absolute;
    top: -20px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.5em;
    animation: sparkle 1.5s ease infinite;
}

.smoke {
    position: absolute;
    top: -30px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.4em;
    opacity: 0;
    animation: smoke-rise 2s ease forwards;
}

.result-title { font-size: 2.5em; margin-bottom: 15px; }
.success-content .result-title { color: #22c55e; text-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
.failure-content .result-title { color: #ef4444; text-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }

.result-message { font-size: 1.2em; color: #cbd5e1; margin-bottom: 30px; line-height: 1.6; }

.success-effects { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: -1; }

.glow-circle {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent);
    animation: pulse-glow 2s ease-in-out infinite;
}

.glow-circle.delay-1 { animation-delay: 0.5s; }
.glow-circle.delay-2 { animation-delay: 1s; }

.errors-list {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.error-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: #fca5a5;
    text-align: left;
    border-left: 3px solid #ef4444;
}

.error-item:last-child { margin-bottom: 0; }

.result-btn {
    padding: 15px 40px;
    font-size: 1.3em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
}

.success-btn { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4); }
.success-btn:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(34, 197, 94, 0.6); }
.failure-btn { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4); }
.failure-btn:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(239, 68, 68, 0.6); }

.confetti { position: fixed; width: 10px; height: 10px; top: -10px; z-index: 2001; animation: confetti-fall linear forwards; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(5deg); } }
@keyframes sparkle { 0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } 50% { opacity: 0.5; transform: translateX(-50%) scale(1.2); } }
@keyframes pulse-glow { 0%, 100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.2); opacity: 0.1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@keyframes smoke-rise { 0% { opacity: 0; transform: translateX(-50%) translateY(0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-50px); } }
@keyframes confetti-fall { to { transform: translateY(100vh) rotate(360deg); } }

.history-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #475569;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

#actionHistory { overflow-y: auto; flex: 1; min-height: 0; }
.history-panel h3 { color: #a855f7; margin-bottom: 15px; }

.history-item {
    background: rgba(30, 41, 59, 0.5);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #a855f7;
}

.history-item strong { color: #f59e0b; }

button { font-family: 'Georgia', serif; margin: 5px; }

.site-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #64748b;
    font-size: 0.9em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.site-footer:hover { opacity: 1; }
.site-footer p { margin: 0; font-style: italic; }

.scroll-top-btn {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid #a855f7;
    background: rgba(26, 26, 46, 0.9);
    color: #a855f7;
    font-size: 1.3em;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    z-index: 100;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { background: rgba(168, 85, 247, 0.2); transform: translateY(-3px); box-shadow: 0 0 25px rgba(168, 85, 247, 0.5); }

/* ===== ADMIN STYLES ===== */

.admin-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.potions-list-admin {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #a855f7;
    border-radius: 15px;
    padding: 20px;
}

.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; }

.tab-btn {
    flex: 1;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid #475569;
    color: #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn.active { background: linear-gradient(135deg, #a855f7, #7c3aed); border-color: #a855f7; color: white; }
.tab-btn:hover:not(.active) { border-color: #a855f7; }
.tab-content h2 { color: #a855f7; margin-bottom: 20px; }

.ingredient-item-admin {
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.ingredient-item-admin:hover { border-color: #22c55e; transform: translateX(5px); }
.ingredient-item-admin.non-editable { cursor: default; opacity: 0.7; }
.ingredient-item-admin.non-editable:hover { border-color: transparent; transform: none; }

.ingredient-editor {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #22c55e;
    border-radius: 15px;
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

.ingredient-editor h2 { color: #22c55e; margin-bottom: 30px; }

.icon-selector-ingredient {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    margin-top: 10px;
}

.potion-item-admin {
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.potion-item-admin:hover { border-color: #a855f7; transform: translateX(5px); }
.potion-item-admin.active { border-color: #a855f7; background: rgba(168, 85, 247, 0.2); }

.potion-editor {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #a855f7;
    border-radius: 15px;
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

.potion-editor h2 { color: #a855f7; margin-bottom: 30px; }

.form-section { margin-bottom: 30px; padding: 25px; background: rgba(30, 41, 59, 0.3); border-radius: 10px; }
.form-section:last-of-type { margin-bottom: 20px; }
.form-section h3 { color: #f59e0b; margin-bottom: 20px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: #cbd5e1; margin-bottom: 8px; font-weight: bold; }

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid #475569;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 1em;
    font-family: 'Georgia', serif;
}

.form-group select[multiple] { height: 120px !important; max-height: 120px; overflow-y: auto; padding: 5px; }
.form-group select option { padding: 6px 8px; background: rgba(15, 23, 42, 0.9); color: #e4e4e7; margin-bottom: 2px; border-radius: 4px; }
.form-group select option:checked { background: linear-gradient(135deg, #a855f7, #7c3aed) !important; color: white; font-weight: bold; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: #a855f7; }

.icon-selector {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    margin-top: 10px;
}

.icon-category { margin-bottom: 20px; }

.icon-category-title {
    color: #a855f7;
    font-size: 0.9em;
    margin-bottom: 10px;
    padding: 5px 10px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 5px;
    border-left: 3px solid #a855f7;
}

.icon-category-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }

.icon-option {
    font-size: 2em;
    padding: 10px;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid #475569;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.icon-option:hover { border-color: #a855f7; transform: scale(1.1); }
.icon-option.selected { border-color: #a855f7; background: rgba(168, 85, 247, 0.3); box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }

.ingredient-builder { background: rgba(30, 41, 59, 0.3); padding: 20px; border-radius: 10px; margin-top: 15px; }
.ingredient-builder .form-group { margin-bottom: 15px; }

.selected-ingredients-admin { margin-top: 20px; min-height: 50px; }

.admin-ingredient-item {
    background: rgba(168, 85, 247, 0.2);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #a855f7;
}

.admin-ingredient-item button { background: #ef4444; color: white; border: none; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-weight: bold; }
.admin-ingredient-item button:hover { background: #dc2626; }

.step-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.step-modal.show { display: flex; }

.step-modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #a855f7;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
}

.step-modal-content h3 { color: #a855f7; margin-bottom: 20px; font-size: 1.8em; }

.modal-buttons { display: flex; gap: 15px; margin-top: 25px; justify-content: center; }

.recipe-steps-simple { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }

.recipe-step-simple {
    background: rgba(15, 23, 42, 0.5);
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #475569;
    display: grid;
    grid-template-columns: 80px 40px 70px 1fr 40px;
    gap: 15px;
    align-items: center;
    transition: border-color 0.3s ease;
}

.recipe-step-simple:hover { border-color: #a855f7; }
.step-number { color: #f59e0b; font-weight: bold; }
.step-time-display { color: #22c55e; font-weight: bold; }
.step-desc { color: #cbd5e1; }

.remove-step-btn-simple {
    background: #ef4444;
    color: white;
    border: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.remove-step-btn-simple:hover { background: #dc2626; transform: scale(1.15); box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }

#recipeSteps { margin-bottom: 20px; }

.form-actions { display: flex; gap: 15px; margin-top: 30px; justify-content: center; }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(239, 68, 68, 0.6); }

.back-btn {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #a855f7;
    transition: background 0.3s ease;
    position: absolute;
    top: 15px;
    left: 15px;
}

.back-btn:hover { background: rgba(168, 85, 247, 0.4); }

.logs-btn {
    position: absolute;
    top: 20px; right: 180px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logs-btn:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); transform: scale(1.05); }

.logs-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.logs-modal.show { display: flex; }

.logs-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #a855f7;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.6);
}

.logs-content h2 { color: #a855f7; margin-bottom: 20px; }

.log-item {
    background: rgba(30, 41, 59, 0.5);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.log-date { color: #f59e0b; font-weight: bold; min-width: 150px; }
.log-action { color: #cbd5e1; flex: 1; }

/* ===== AUTH / BACKUP STYLES ===== */

.auth-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.auth-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #a855f7;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.6);
}

.auth-content h2 { color: #a855f7; margin-bottom: 15px; font-size: 2em; }
.auth-content p { color: #94a3b8; margin-bottom: 25px; }

.auth-content input {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid #475569;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.auth-content input:focus { outline: none; border-color: #a855f7; }
.auth-error { color: #ef4444; margin-top: 10px; font-weight: bold; }

.logout-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover { background: #dc2626; transform: scale(1.05); }

/* ===== LOGIN NOTIFICATION ===== */

.login-notification {
    position: fixed;
    top: -200px;
    right: 30px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 3px solid #22c55e;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.5);
    z-index: 5000;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 350px;
}

.login-notification.show { top: 30px; }
.notif-icon { font-size: 3em; animation: notifBounce 0.6s ease; }
.notif-content { flex: 1; }
.notif-title { font-size: 1.3em; font-weight: bold; color: white; margin-bottom: 5px; }
.notif-message { color: rgba(255,255,255,0.9); font-size: 1em; margin-bottom: 3px; }
.notif-expiry { color: rgba(255,255,255,0.8); font-size: 0.85em; font-style: italic; }

@keyframes notifBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    75% { transform: scale(0.95); }
}

/* ===== DIFFICULTY MODAL ===== */

.difficulty-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.difficulty-modal.show { opacity: 1; }

.difficulty-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(168, 85, 247, 0.6);
    border-radius: 24px;
    padding: 44px 40px 36px;
    max-width: 920px;
    width: 95%;
    text-align: center;
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.3), 0 0 120px rgba(168, 85, 247, 0.1);
    position: relative;
    overflow: hidden;
}

.difficulty-content::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 400px; height: 200px;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.15), transparent 70%);
    pointer-events: none;
}

.difficulty-content h2 {
    font-size: 2.2em;
    color: #a855f7;
    margin-bottom: 8px;
    text-shadow: 0 0 24px rgba(168, 85, 247, 0.7);
    position: relative;
}

.difficulty-subtitle {
    color: #64748b;
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 32px;
    position: relative;
}

.difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.difficulty-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 2px solid #475569;
    border-radius: 16px;
    padding: 32px 20px 24px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    animation: cardSlideIn 0.4s ease both;
}

.difficulty-card:nth-child(1) { animation-delay: 0.05s; }
.difficulty-card:nth-child(2) { animation-delay: 0.15s; }
.difficulty-card:nth-child(3) { animation-delay: 0.25s; }

.difficulty-card::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.04), transparent);
    transition: left 0.5s ease;
}

.difficulty-card:hover::after { left: 120%; }

.difficulty-card.easy   { border-color: rgba(34, 197, 94, 0.5);  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1) inset; }
.difficulty-card.normal { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 20px rgba(245, 158, 11, 0.1) inset; }
.difficulty-card.hard   { border-color: rgba(239, 68, 68, 0.5);  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1) inset; }

.difficulty-card:hover { transform: translateY(-8px); }

.difficulty-card.easy:hover   { border-color: #22c55e; box-shadow: 0 12px 36px rgba(34, 197, 94, 0.45),  0 0 20px rgba(34, 197, 94, 0.15) inset; }
.difficulty-card.normal:hover { border-color: #f59e0b; box-shadow: 0 12px 36px rgba(245, 158, 11, 0.45), 0 0 20px rgba(245, 158, 11, 0.15) inset; }
.difficulty-card.hard:hover   { border-color: #ef4444; box-shadow: 0 12px 36px rgba(239, 68, 68, 0.45),  0 0 20px rgba(239, 68, 68, 0.15) inset; }

.difficulty-badge {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 0.65em;
    font-family: 'Georgia', serif;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    letter-spacing: 0.03em;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.difficulty-icon {
    font-size: 3.2em;
    margin-bottom: 14px;
    display: block;
    line-height: 1;
}

.difficulty-card.easy   .difficulty-icon { filter: drop-shadow(0 0 12px rgba(34,197,94,0.8));  }
.difficulty-card.normal .difficulty-icon { filter: drop-shadow(0 0 12px rgba(245,158,11,0.8)); }
.difficulty-card.hard   .difficulty-icon { filter: drop-shadow(0 0 12px rgba(239,68,68,0.8));  }

.difficulty-card h3 { font-size: 1.6em; margin-bottom: 12px; }
.difficulty-card.easy   h3 { color: #22c55e; }
.difficulty-card.normal h3 { color: #f59e0b; }
.difficulty-card.hard   h3 { color: #ef4444; }

.difficulty-card p { color: #94a3b8; margin: 4px 0; font-size: 0.9em; line-height: 1.5; }

.difficulty-divider { border: none; border-top: 1px solid rgba(71, 85, 105, 0.4); margin: 0 0 20px; }

.difficulty-cancel-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(71, 85, 105, 0.5);
    padding: 9px 28px;
    font-family: 'Georgia', serif;
    font-size: 0.9em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.difficulty-cancel-btn:hover { color: #94a3b8; border-color: #64748b; background: rgba(71, 85, 105, 0.2); }

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .admin-layout { grid-template-columns: 1fr; }
    .login-notification { right: 15px; min-width: 300px; }
}

@media (max-width: 768px) {
    .simulator-main { grid-template-columns: 1fr; }
    .potion-header { flex-direction: column; }
    .ingredient-selection { grid-template-columns: 1fr; }
    header h1 { font-size: 2em; }
    .potions-grid { grid-template-columns: 1fr; }
    .recipe-layout { grid-template-columns: 1fr; }
    .recipe-ingredients { position: static; }
    .difficulty-options { grid-template-columns: 1fr; }
    .difficulty-content { padding: 30px 20px 24px; }
}
