/* ========================================
   PREPARED SPELLS - VIVID TEAL GREEN + MODERN DESIGN
   Matching the vibrant #7bc9a6 used throughout the app
   ======================================== */

.spell-list {
    display: grid;
    gap: 14px;
}

/* Spell Entry - MODERN GLASS MORPHISM DESIGN - VIVID PURPLE BORDER */
.spell-entry {
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.85) 0%, rgba(20, 20, 28, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 16px;
    padding: 20px 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(167, 139, 250, 0.15);
}

/* Subtle gradient overlay for depth */
.spell-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spell-entry:hover {
    border-color: rgba(0, 255, 204, 0.6);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

.spell-entry:hover::before {
    opacity: 1;
}

/* Main grid: spell name, stats, actions */
.spell-entry-compact-main {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 28px;
    align-items: center;
}

/* Left Section - Editable Name + Runes */
.spell-compact-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Editable Spell Name - VIVID CYAN #00ffcc (matching Action/Bonus Speed) */
.spell-name-input {
    background: transparent;
    border: none;
    padding: 0;
    color: #00ffcc;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Lora', serif;
    font-style: italic;
    transition: all 0.3s ease;
    width: 100%;
    text-shadow: 0 2px 10px rgba(0, 255, 204, 0.6);
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.spell-name-input:hover {
    text-shadow: 0 2px 14px rgba(0, 255, 204, 0.8);
    color: #33ffda;
}

.spell-name-input:focus {
    outline: none;
    text-shadow: 0 3px 18px rgba(0, 255, 204, 0.9);
    color: #66ffe8;
}

.spell-name-input::placeholder {
    color: rgba(0, 255, 204, 0.4);
    font-style: italic;
}

/* Spell Runes Display - VIVID CYAN (slightly dimmer) */
.spell-runes {
    color: #00ffcc;
    font-size: 0.8rem;
    font-family: 'Lora', serif;
    font-style: normal;
    line-height: 1.5;
    font-weight: 500;
    opacity: 0.75;
    text-shadow: 0 1px 6px rgba(0, 255, 204, 0.4);
    letter-spacing: 0.5px;
}

/* Center Section - PURPLE STATS PILLS (matching history) */
.spell-compact-stats {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.spell-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 16px;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 12px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.spell-stat-pill:hover {
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(167, 139, 250, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.25);
}

.spell-stat-pill .pill-label {
    color: #c4b5fd;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.spell-stat-pill .pill-value {
    color: #e9d5ff;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(167, 139, 250, 0.5);
}

/* ========================================
   TRANSLUCENT HOLOGRAPHIC BUTTONS
   ======================================== */
.spell-meta,
.spell-compact-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.spell-action-btn,
.btn-cast,
.btn-remove {
    width: 90px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Lora', serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Holographic shimmer effect */
.spell-action-btn::before,
.btn-cast::before,
.btn-remove::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -200%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 25%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: holographic-sweep 3s infinite;
    pointer-events: none;
}

@keyframes holographic-sweep {
    0% {
        left: -200%;
    }
    50%, 100% {
        left: 200%;
    }
}

/* Additional shimmer on hover */
.spell-action-btn::after,
.btn-cast::after,
.btn-remove::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spell-action-btn:hover::after,
.btn-cast:hover::after,
.btn-remove:hover::after {
    opacity: 1;
}

.spell-action-btn:hover,
.btn-cast:hover,
.btn-remove:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.spell-action-btn:active,
.btn-cast:active,
.btn-remove:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* Cast Button - PURPLE translucent */
.btn-cast {
    background: rgba(139, 92, 246, 0.25);
    color: rgba(196, 181, 253, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-cast:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: rgba(167, 139, 250, 0.7);
    color: rgba(233, 213, 255, 1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5),
                0 0 24px rgba(167, 139, 250, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Remove Button - RED translucent */
.btn-remove {
    background: rgba(239, 68, 68, 0.25);
    color: rgba(252, 165, 165, 0.95);
    border: 1px solid rgba(248, 113, 113, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(248, 113, 113, 0.7);
    color: rgba(254, 202, 202, 1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5),
                0 0 24px rgba(248, 113, 113, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Legacy spell-header (if still used) */
.spell-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.spell-name-wrapper {
    display: flex;
    align-items: center;
}

/* Spell Notes */
.spell-notes {
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 2px solid rgba(0, 255, 204, 0.4);
}

/* Empty State */
.empty-spellbook {
    text-align: center;
    padding: 80px 40px;
    color: #6b7280;
}

.empty-spellbook-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-spellbook p {
    font-size: 1rem;
    line-height: 1.6;
    color: #9ca3af;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .spell-entry-compact-main {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .spell-compact-stats {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .spell-stat-pill {
        min-width: 95px;
    }
    
    .spell-meta,
    .spell-compact-actions {
        justify-content: center;
    }
    
    .spell-action-btn,
    .btn-cast,
    .btn-remove {
        width: 85px;
        height: 38px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .spell-entry {
        padding: 18px 20px;
    }

    .spell-name-input {
        font-size: 1.1rem;
    }

    .spell-runes {
        font-size: 0.75rem;
    }

    .spell-stat-pill {
        padding: 8px 14px;
        min-width: 90px;
    }

    .spell-stat-pill .pill-label {
        font-size: 0.65rem;
    }

    .spell-stat-pill .pill-value {
        font-size: 1.15rem;
    }

    .spell-action-btn,
    .btn-cast,
    .btn-remove {
        width: 80px;
        height: 36px;
        font-size: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .spell-entry {
        padding: 16px 18px;
    }

    .spell-entry-compact-main {
        gap: 12px;
    }

    .spell-name-input {
        font-size: 1rem;
    }

    .spell-runes {
        font-size: 0.7rem;
    }

    .spell-compact-stats {
        gap: 8px;
        flex-direction: column;
        width: 100%;
    }

    .spell-stat-pill {
        padding: 8px 14px;
        min-width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    .spell-stat-pill .pill-label {
        font-size: 0.65rem;
    }

    .spell-stat-pill .pill-value {
        font-size: 1.05rem;
    }

    .spell-action-btn,
    .btn-cast,
    .btn-remove {
        width: 75px;
        height: 34px;
        font-size: 0.7rem;
    }
}