/* Custom RPG styling */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Uncial+Antiqua&display=swap');

body {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #8B4513, #CD853F);
    background-attachment: fixed;
}

.font-serif {
    font-family: 'Uncial Antiqua', serif;
}

/* Parchment texture effect */
.bg-amber-800 {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 108, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(120, 119, 108, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 119, 108, 0.3) 0%, transparent 50%);
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Celtic border effect */
.border-yellow-600 {
    border-style: solid;
    border-image: linear-gradient(45deg, #D4AF37, #FFD700, #D4AF37) 1;
}

/* Retro progress bar styling */
.progress-bar {
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #4CAF50 100%);
    height: 8px;
    border-radius: 4px;
    border: 1px solid #2E7D32;
}

/* Inventory grid styling */
.grid-cols-4 > div {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 2px inset #D4AF37;
}

.grid-cols-4 > div:hover {
    background: linear-gradient(135deg, #A0522D, #CD853F);
    border-color: #FFD700;
}

/* Typewriter effect for story text */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(40, end);
}

/* Fantasy scroll effect */
.scroll-border {
    border: 8px solid transparent;
    border-image: url("data:image/svg+xml,%3csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3cpattern id='a' patternUnits='userSpaceOnUse' width='20' height='20'%3e%3cpath d='M10 0v20M0 10h20' stroke='%23D4AF37' stroke-width='1'/%3e%3c/pattern%3e%3c/defs%3e%3crect width='100' height='100' fill='url(%23a)'/%3e%3c/svg%3e") 8;
}

/* Glowing text effect for titles */
.text-glow {
    text-shadow: 
        0 0 5px #FFD700,
        0 0 10px #FFD700,
        0 0 15px #FFD700,
        0 0 20px #FFD700;
}

/* Medieval ornament styling */
.ornament::before {
    content: "⚔️";
    margin-right: 0.5rem;
}

.ornament::after {
    content: "🛡️";
    margin-left: 0.5rem;
}

/* Character stat display */
.stat-display {
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.2) 50%, transparent 100%);
    border-left: 3px solid #D4AF37;
    padding-left: 1rem;
}

/* Loading spinner for AI generation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #D4AF37;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .w-80 {
        width: 100%;
    }
    
    .flex {
        flex-direction: column;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
}