/* 
 * Components CSS - The Supporting Cast of Our Digital Theatre
 * Where individual elements get their moment to shine
 * Like a well-orchestrated West End production, but with more transparency effects
 */

/* Tile Base Class - The foundation of our content empire */
.tile {
    background: rgba(255, 255, 255, 0.08); /* Translucent as British weather promises */
    backdrop-filter: blur(25px); /* Soft focus for that dreamy effect */
    border-radius: 4px; /* Sharp corners are for corporate presentations */
    
    /* Box shadow that would make a Victorian mansion jealous */
    box-shadow: 
        0 calc(0.8vw + 8px) calc(3vw + 30px) rgba(0, 0, 0, 0.3),
        0 calc(0.2vw + 2px) calc(0.8vw + 8px) rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 1px rgba(255, 255, 255, 0.05);
    
    margin: calc(1.5vw + 15px) 0;
    padding: calc(2.5vw + 25px);
    border: 1px solid rgba(45, 25, 65, 0.8); /* Mysterious purple border */
    opacity: 0; /* Start invisible, like British optimism */
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    width: min(95vw, 1600px); /* Responsive but not excessive */
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    display: block;
}

/* Tile decorative elements - Because minimalism is overrated */
.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1) 20%, 
        rgba(45, 25, 65, 0.8) 50%, 
        rgba(255, 255, 255, 0.1) 80%, 
        transparent);
}

.tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Tile hover effects - Interactive feedback for the curious */
.tile:hover {
    transform: scale(1.002); /* Subtle expansion, like British empire aspirations */
    backdrop-filter: blur(30px);
    box-shadow: 
        0 calc(1.2vw + 12px) calc(4vw + 40px) rgba(0, 0, 0, 0.4),
        0 calc(0.4vw + 4px) calc(1.2vw + 12px) rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 calc(1vw + 10px) rgba(255, 255, 255, 0.02);
}

.tile:hover::after {
    opacity: 1; /* Reveal the hidden elegance */
}

/* Tile Animation States - The choreography of our presentation */
.tile.slide-in-left {
    transform: translateX(-100vw); /* Start off-stage left */
}

.tile.slide-in-right {
    transform: translateX(100vw); /* Start off-stage right */
}

.tile.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) !important; /* Center stage, where they belong */
}

.tile.animate-out {
    opacity: 0; /* Fade to black like a proper theatre curtain */
}

.tile.animate-out.slide-in-left {
    transform: translateX(-100vw); /* Exit left, pursued by a bear */
}

.tile.animate-out.slide-in-right {
    transform: translateX(100vw); /* Exit right, with dignity intact */
}

/* Specialized Tile Types - Each with their own personality */

/* Header Tile - The grand opening */
.header-tile {
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* Slightly more prominent */
    backdrop-filter: blur(25px);
    color: #ffffff;
    border: 1px solid rgba(45, 25, 65, 0.8);
}

.header-tile h1, .header-tile .presenter {
    color: #ffffff; /* Bright as British teeth stereotypes (ironically) */
}

/* Warning Tile - The moment of uncomfortable realization */
.warning-tile {
    background: rgba(255, 100, 100, 0.08); /* Subtle red tint for concern */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(45, 25, 65, 0.8);
    border-left: 4px solid #2d1941; /* Left accent for emphasis */
    position: relative;
    overflow: hidden;
}

.warning-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px; /* Account for the left border */
    width: calc(100% - 4px);
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 100, 100, 0.3), 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent);
}

/* Reveal Tile - The moment of enlightenment */
.reveal-tile {
    background: rgba(100, 255, 100, 0.08); /* Subtle green for revelation */
    backdrop-filter: blur(25px);
    color: #ffffff;
    border: 1px solid rgba(45, 25, 65, 0.8);
    border-left: 4px solid #2d1941;
    position: relative;
    overflow: hidden;
}

.reveal-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: calc(100% - 4px);
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(100, 255, 100, 0.3), 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent);
}

.reveal-tile h2, .reveal-tile h3, .reveal-tile h4 {
    color: #ffffff;
}

/* Method Tile - The pinnacle of our presentation */
.method-tile {
    background: rgba(255, 255, 150, 0.08); /* Golden glow for the grand reveal */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(45, 25, 65, 0.8);
    border-radius: 4px;
    padding: calc(2.5vw + 25px);
    margin: calc(1.5vw + 15px) 0;
    color: #ffffff;
    box-shadow: 
        0 calc(1vw + 10px) calc(3vw + 30px) rgba(0, 0, 0, 0.3),
        0 calc(0.2vw + 2px) calc(0.8vw + 8px) rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.method-tile:hover {
    transform: scale(1.01); /* Slight emphasis on hover */
    backdrop-filter: blur(30px);
}

.method-tile h2, .method-tile h3, .method-tile h4 {
    color: #ffffff;
    text-align: center;
    line-height: 1.3;
    margin-bottom: calc(0.8vw + 8px);
}

/* Footer Tile - The curtain call */
.footer-tile {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    color: #ffffff;
    border: 1px solid rgba(45, 25, 65, 0.8);
}

/* Code Container - Where the magic happens (literally) */
.code-container {
    background: rgba(0, 0, 0, 0.3); /* Dark as a developer's soul */
    backdrop-filter: blur(20px);
    border-radius: 4px;
    padding: calc(1.2vw + 12px);
    margin: calc(0.8vw + 10px) 0;
    overflow-x: auto; /* Horizontal scroll for long lines */
    border: 1px solid rgba(45, 25, 65, 0.6);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.4),
        0 calc(0.4vw + 4px) calc(1.2vw + 12px) rgba(0, 0, 0, 0.2);
}

.code-container code {
    color: #e0e0e0; /* Easy on the eyes */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace; /* Proper coding font */
    font-size: calc(0.55rem + 0.25vw);
    line-height: 1.5;
    white-space: pre; /* Preserve formatting */
}

.code-container .comment {
    color: #ff0062; /* Hot pink for sassy comments */
    font-weight: 500;
}

/* Highlight Quote - For those profound moments */
.highlight-quote {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border-left: 4px solid #2d1941; /* Left accent */
    padding: calc(1vw + 10px);
    margin: calc(0.8vw + 10px) 0;
    border-radius: 0 4px 4px 0; /* Only round the right side */
    font-style: italic; /* Because it's a quote */
    color: #ffffff;
    font-size: calc(0.7rem + 0.25vw);
    border: 1px solid rgba(45, 25, 65, 0.4);
    border-left: 4px solid #2d1941; /* Emphasis border */
    box-shadow: 0 calc(0.2vw + 2px) calc(0.8vw + 8px) rgba(0, 0, 0, 0.2);
    position: relative;
    letter-spacing: 0.3px;
    line-height: 1.7;
}

.highlight-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: calc(100% - 4px);
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(45, 25, 65, 0.6), 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent);
}

/* Example Card - For showcasing transformations */
.example-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(45, 25, 65, 0.6);
    border-radius: 4px;
    padding: calc(1.5vw + 15px);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0; /* Start hidden */
    transform: translateX(-30px) scale(0.98); /* Start slightly off-position */
    box-shadow: 
        0 calc(0.4vw + 4px) calc(1.2vw + 12px) rgba(0, 0, 0, 0.2),
        0 calc(0.1vw + 1px) calc(0.4vw + 4px) rgba(0, 0, 0, 0.1);
}

.example-card.visible {
    opacity: 1;
    transform: translateX(0) scale(1); /* Slide into position */
}

.example-card:hover {
    transform: scale(1.02); /* Gentle hover effect */
    backdrop-filter: blur(25px);
    box-shadow: 
        0 calc(0.8vw + 8px) calc(1.8vw + 18px) rgba(0, 0, 0, 0.3),
        0 calc(0.2vw + 2px) calc(0.8vw + 8px) rgba(0, 0, 0, 0.2);
}

.example-card h4 {
    color: #ffffff;
    margin-bottom: calc(0.6vw + 8px);
    font-size: calc(0.8rem + 0.4vw);
    text-align: center;
    line-height: 1.3;
}

.example-card p {
    color: #ffffff;
    font-size: calc(0.7rem + 0.2vw);
}

/* Keyword highlighting - For technical terms */
.keyword {
    background: rgba(255, 0, 98, 0.2); /* Hot pink background */
    color: white;
    padding: calc(0.1vw + 1px) calc(0.3vw + 3px);
    border-radius: 2px;
    font-family: 'Consolas', monospace; /* Monospace for code-like appearance */
    font-size: calc(0.6rem + 0.2vw);
    font-weight: 500;
    border: 1px solid rgba(255, 0, 98, 0.4);
}

/* Syntax highlighting for code samples */
.language-js { color: #f1c40f; } /* JavaScript yellow */
.language-comment { color: #95a5a6; } /* Comment grey */
.language-string { color: #2ecc71; } /* String green */
.language-keyword { color: #e74c3c; } /* Keyword red */
.language-function { color: #3498db; } /* Function blue */
