/* TaleSmith Custom Styles */

/* Base Typography */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.story-text {
    font-family: 'Merriweather', Georgia, serif;
    line-height: 1.8;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Flash Messages */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #9333ea20, #7e22ce20);
    border: 1px solid #7e22ce40;
    color: #e9d5ff;
}

.message.success {
    background: linear-gradient(135deg, #10b98120, #059669220);
    border: 1px solid #10b98140;
}

.message.error {
    background: linear-gradient(135deg, #ef444420, #dc262620);
    border: 1px solid #ef444440;
}

/* Card Styles */
.scenario-card {
    background: linear-gradient(135deg, #2a243890, #1e182890);
    border: 1px solid #7e22ce30;
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.2);
    border-color: #7e22ce60;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
}

/* Input Fields */
.form-input {
    background: #1e182890;
    border: 1px solid #7e22ce30;
    color: #e9d5ff;
}

.form-input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1828;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea, #a855f7);
}

/* Loading Animation */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #a855f7, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(42, 36, 56, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* Story Container */
.story-container {
    background: linear-gradient(135deg, #1e182810, #2a243810);
    border-left: 3px solid #9333ea;
    padding: 1.5rem;
    margin: 1rem 0;
}

/* Character Badge */
.character-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #7e22ce30, #9333ea30);
    border: 1px solid #9333ea60;
    border-radius: 9999px;
    font-size: 0.875rem;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: #2a2438;
    border: 1px solid #7e22ce40;
    border-radius: 0.25rem;
    white-space: nowrap;
    font-size: 0.875rem;
    z-index: 1000;
}

// Scenarios
.scenario-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scenario-card:hover {
    transform: translateY(-4px);
}
.scenario-card:hover .scenario-image {
    transform: scale(1.05);
}
.scenario-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.create-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.1));
    border: 2px dashed rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
}
.create-card:hover {
    border-color: rgba(168, 85, 247, 0.6);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
    transform: translateY(-4px);
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(24, 19, 32, 0.9);
}

.modal-content {
    background: linear-gradient(135deg, #1e1828, #2a2438);
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 0 25px 50px -12px rgba(147, 51, 234, 0.25);
}

.description-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 1rem;
}

.description-scroll::-webkit-scrollbar {
    width: 8px;
}

.description-scroll::-webkit-scrollbar-track {
    background: rgba(30, 24, 40, 0.5);
    border-radius: 4px;
}

.description-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    border-radius: 4px;
}

.modal-image {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.play-button {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    transition: all 0.3s ease;
}

.play-button:hover {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.4);
}
