* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    /* Monochrome colors */
    --void: #000000;
    --abyss: #0a0a0a;
    --midnight: #111111;
    --twilight: #1a1a1a;
    --shadow: #222222;
    --dusk: #333333;
    --stone: #444444;
    --smoke: #555555;
    --ash: #666666;
    --dust: #777777;
    --fog: #888888;
    --mist: #999999;
    --haze: #aaaaaa;
    --cloud: #bbbbbb;
    --silver: #cccccc;
    --pearl: #dddddd;
    --frost: #eeeeee;
    --glacier: #ffffff;
    
    /* Glass effects */
    --glass-dark: rgba(0, 0, 0, 0.2);
    --glass-light: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Glow effects */
    --glow-subtle: rgba(255, 255, 255, 0.02);
    --glow-gentle: rgba(255, 255, 255, 0.04);
    --glow-visible: rgba(255, 255, 255, 0.08);
    
    /* Shadows */
    --shadow-light: rgba(0, 0, 0, 0.25);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-deep: rgba(0, 0, 0, 0.6);
}

body {
    background: var(--void);
    color: var(--pearl);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Grid Background */
.grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--midnight) 1px, transparent 1px),
        linear-gradient(90deg, var(--midnight) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.03;
    pointer-events: none;
    z-index: -2;
}

/* Glow Effect */
.luminous-aura {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vmax;
    height: 100vmax;
    background: radial-gradient(
        circle at center,
        var(--glow-gentle) 0%,
        transparent 60%
    );
    transform: translate(-50%, -50%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* Home Page */
.home-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.central-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    z-index: 1;
}

/* Emblem */
.emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.icon-wrapper {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--abyss);
    border: 1px solid var(--shadow);
    border-radius: 24px;
    margin-bottom: 1.5rem;
    box-shadow: 
        0 0 40px var(--glow-gentle),
        inset 0 1px 0 var(--glow-subtle);
    transition: all 0.3s ease;
}

.icon-wrapper:hover {
    transform: translateY(-5px);
    border-color: var(--dusk);
    box-shadow: 
        0 0 60px var(--glow-visible),
        inset 0 1px 0 var(--glow-gentle);
}

.icon-wrapper i {
    font-size: 3rem;
    color: var(--glacier);
}

.title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--frost);
    text-align: center;
}

/* Search Module */
.search-module {
    width: 100%;
    max-width: 800px;
    height: 70px;
    display: flex;
    align-items: center;
    background: var(--abyss);
    border: 1px solid var(--shadow);
    border-radius: 20px;
    margin-bottom: 4rem;
    padding: 0 1.5rem;
    box-shadow: 
        0 8px 32px var(--shadow-light),
        inset 0 1px 0 var(--glow-subtle);
    transition: all 0.3s ease;
}

.search-module:hover,
.search-module:focus-within {
    border-color: var(--dusk);
    box-shadow: 
        0 12px 40px var(--shadow-medium),
        inset 0 1px 0 var(--glow-gentle);
    transform: translateY(-2px);
}

.search-glyph {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-glyph i {
    font-size: 1.2rem;
    color: var(--fog);
}

.search-field {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--glacier);
    font-size: 1.1rem;
    padding: 0 1.5rem;
    outline: none;
}

.search-field::placeholder {
    color: var(--ash);
}

.settings-capsule {
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--midnight);
    border: 1px solid var(--shadow);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-capsule:hover {
    background: var(--dusk);
    border-color: var(--stone);
    transform: translateY(-1px);
}

.settings-capsule i {
    font-size: 1.1rem;
    color: var(--haze);
}

/* Tile Collection */
.tile-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.8rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 5rem;
}

.tile {
    background: var(--abyss);
    border: 1px solid var(--shadow);
    border-radius: 20px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 20px var(--shadow-light),
        0 0 0 1px var(--glow-subtle);
    transition: all 0.3s ease;
}

.tile:hover {
    transform: translateY(-8px);
    border-color: var(--dusk);
    background: var(--midnight);
    box-shadow: 
        0 20px 50px var(--shadow-medium),
        0 0 0 1px var(--glow-gentle);
}

.tile-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--glacier);
}

.tile-label {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--haze);
    letter-spacing: 0.03em;
    text-align: center;
}

.tile-add {
    border-style: dashed;
    border-color: var(--ash);
    opacity: 0.7;
}

.tile-add:hover {
    opacity: 1;
    border-color: var(--fog);
}

.delete-tile {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    background: var(--shadow-deep);
    border: 1px solid var(--shadow);
    border-radius: 8px;
    color: var(--pearl);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.tile:hover .delete-tile {
    opacity: 1;
}

.delete-tile:hover {
    background: var(--dusk);
    border-color: var(--stone);
}

/* Footer */
.footer-cluster {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    display: flex;
    gap: 1.8rem;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    padding: 1.2rem 2rem;
    border-radius: 18px;
    border: 1px solid var(--shadow);
    box-shadow: 
        0 8px 32px var(--shadow-light),
        inset 0 1px 0 var(--glow-subtle);
}

.footer-link {
    color: var(--fog);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--glacier);
    transform: translateY(-2px);
}

/* Hidden class */
.hidden {
    display: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--fog);
    border-top-color: var(--glacier);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}