/* Hollow Knight Silksong Game-Themed Icons and Visual Elements */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    /* Silksong-themed colors based on official art */
    --hornet-red: #c73e1d;
    --silk-white: #f8f6f0;
    --needle-silver: #c0c5ce;
    --shadow-purple: #2b2b52;
    --pharloom-gold: #d4af37;
    --moss-green: #4a7c3c;
    --coral-pink: #ff6b9d;
    --bone-beige: #e8dcc0;
    
    /* Game-themed gradients */
    --hornet-gradient: linear-gradient(135deg, var(--hornet-red), #a63317);
    --silk-gradient: linear-gradient(135deg, var(--silk-white), #e8e6e3);
    --shadow-gradient: linear-gradient(135deg, var(--shadow-purple), #1a1a3a);
    --pharloom-gradient: linear-gradient(135deg, var(--pharloom-gold), #b8941f);
}

/* Game-Themed Font Classes */
.silksong-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.silksong-text {
    font-family: 'Crimson Text', serif;
    line-height: 1.6;
}

/* Custom Game Icons using CSS */
.game-icon {
    display: inline-block;
    position: relative;
    font-style: normal;
    font-size: 1em;
}

.game-icon::before {
    display: inline-block;
    font-weight: normal;
    line-height: 1;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Hornet Needle Icon */
.icon-needle::before {
    content: "⚔️";
    filter: hue-rotate(15deg) brightness(1.2);
}

.icon-needle-alt {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
}

.icon-needle-alt::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--needle-silver), var(--silk-white));
    transform: translateY(-50%) rotate(-45deg);
    box-shadow: 0 0 4px rgba(192, 197, 206, 0.6);
}

/* Silk Thread Icon */
.icon-silk::before {
    content: "🧵";
    filter: hue-rotate(340deg) brightness(1.1);
}

.icon-silk-thread {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
}

.icon-silk-thread::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, var(--silk-white) 40%, transparent 50%);
    border-radius: 50%;
    animation: silkGlow 2s ease-in-out infinite;
}

@keyframes silkGlow {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Hornet Mask Icon */
.icon-mask::before {
    content: "🎭";
    filter: hue-rotate(15deg) contrast(1.2);
}

.icon-hornet-mask {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--hornet-gradient);
    border-radius: 50% 50% 40% 40%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.icon-hornet-mask::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 25%;
    width: 20%;
    height: 20%;
    background: var(--shadow-purple);
    border-radius: 50%;
    box-shadow: 25px 0 0 var(--shadow-purple);
}

.icon-hornet-mask::after {
    content: "";
    position: absolute;
    bottom: 15%;
    left: 30%;
    width: 40%;
    height: 3px;
    background: var(--shadow-purple);
    border-radius: 2px;
}

/* Pharloom Crown Icon */
.icon-crown::before {
    content: "👑";
    filter: hue-rotate(45deg) brightness(1.3);
}

.icon-pharloom-crown {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--pharloom-gradient);
    clip-path: polygon(0% 80%, 20% 40%, 40% 60%, 60% 20%, 80% 50%, 100% 80%, 100% 100%, 0% 100%);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

/* Bell/Bellway Icon */
.icon-bell::before {
    content: "🔔";
    filter: hue-rotate(200deg) brightness(1.1);
}

.icon-bellway {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--pharloom-gold);
    border-radius: 50% 50% 0 0;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.icon-bellway::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 30%;
    height: 6px;
    background: var(--shadow-purple);
    border-radius: 0 0 4px 4px;
    transform: translateX(-50%);
}

/* Moss/Nature Icon */
.icon-moss {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--moss-green);
    border-radius: 40% 60% 50% 30%;
    box-shadow: 0 2px 6px rgba(74, 124, 60, 0.4);
}

.icon-moss::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Coral Icon */
.icon-coral {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--coral-pink);
    border-radius: 20% 80% 40% 60%;
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.4);
}

.icon-coral::after {
    content: "";
    position: absolute;
    top: 20%;
    left: 30%;
    width: 40%;
    height: 40%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 60% 40% 80% 20%;
}

/* Bone Icon */
.icon-bone {
    position: relative;
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--bone-beige);
    border-radius: 20px 4px 20px 4px;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(232, 220, 192, 0.6);
}

.icon-bone::before,
.icon-bone::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--bone-beige);
    border-radius: 50%;
}

.icon-bone::before {
    top: -4px;
    left: -4px;
}

.icon-bone::after {
    bottom: -4px;
    right: -4px;
}

/* Animated Icons */
.icon-animated {
    animation: gameIconFloat 3s ease-in-out infinite;
}

@keyframes gameIconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.icon-pulse {
    animation: gameIconPulse 2s ease-in-out infinite;
}

@keyframes gameIconPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Hover Effects for Interactive Elements */
.game-icon-interactive {
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-icon-interactive:hover {
    transform: scale(1.2);
    filter: brightness(1.3) drop-shadow(0 0 8px currentColor);
}

/* Decorative Borders and Frames */
.silksong-border {
    border: 2px solid;
    border-image: linear-gradient(45deg, var(--hornet-red), var(--pharloom-gold), var(--silk-white)) 1;
    position: relative;
}

.silksong-border::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, var(--hornet-red), var(--pharloom-gold), var(--silk-white));
    z-index: -1;
    border-radius: inherit;
}

/* Texture Overlays */
.texture-silk {
    position: relative;
    overflow: hidden;
}

.texture-silk::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, transparent 20%, rgba(248, 246, 240, 0.1) 22%),
        radial-gradient(circle at 75% 75%, transparent 20%, rgba(248, 246, 240, 0.1) 22%);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.3;
}

.texture-stone {
    position: relative;
    background-image: 
        radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.1) 1px, transparent 2px),
        radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.1) 1px, transparent 2px);
    background-size: 15px 15px;
}

/* Loading Animation for Game Elements */
.silksong-loader {
    width: 40px;
    height: 40px;
    position: relative;
    display: inline-block;
}

.silksong-loader::before {
    content: "";
    width: 100%;
    height: 100%;
    border: 3px solid var(--silk-white);
    border-top: 3px solid var(--hornet-red);
    border-radius: 50%;
    position: absolute;
    animation: silksongSpin 1s linear infinite;
}

.silksong-loader::after {
    content: "🕷️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

@keyframes silksongSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-icon {
        font-size: 0.9em;
    }
    
    .silksong-title {
        font-size: 1.5rem;
    }
    
    .icon-hornet-mask,
    .icon-pharloom-crown,
    .icon-bellway,
    .icon-moss,
    .icon-coral,
    .icon-bone {
        width: 0.9em;
        height: 0.9em;
    }
}