/* CSS Variables - Tech Theme */
:root {
    --color-primary: #00D4FF;
    --color-secondary: #7B61FF;
    --color-tool: #00E676;
    --color-game: #FFAB00;
    --color-claw: #FF4081;
    --color-nadal: #78909C;
    --color-bg: #0A0A0F;
    --color-bg-secondary: #12121A;
    --color-card: rgba(255, 255, 255, 0.03);
    --color-card-border: rgba(255, 255, 255, 0.08);
    --color-text: #FFFFFF;
    --color-text-secondary: rgba(255, 255, 255, 0.6);
    --glow-primary: 0 0 30px rgba(0, 212, 255, 0.3);
    --glow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-card: 16px;
    --radius-btn: 12px;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Animated Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* Gradient Orbs */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, 50px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.header {
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.8) 0%, transparent 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 16px;
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Main */
.main {
    flex: 1;
    padding: var(--spacing-xl) 0;
}

/* Site Grid */
.site-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

/* Site Card - Glassmorphism */
.site-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--color-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-card);
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--glow-card);
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.site-card:hover::before {
    left: 100%;
}

.site-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 
        var(--glow-card),
        0 0 40px rgba(0, 212, 255, 0.2);
}

.site-card:active {
    transform: scale(0.98);
}

.card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
}

.card-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.site-card:hover .card-icon::before {
    opacity: 1;
}

.card-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.site-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.site-card p {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    flex: 1;
}

.card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    padding: var(--spacing-xs) var(--spacing-lg);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-btn);
    transition: all 300ms ease;
    background: rgba(0, 212, 255, 0.05);
}

.site-card:hover .card-link {
    background: var(--color-primary);
    color: #0A0A0F;
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Card specific glow colors on hover */
.site-card[data-site="tools"]:hover {
    border-color: var(--color-tool);
    box-shadow: var(--glow-card), 0 0 40px rgba(0, 230, 118, 0.2);
}

.site-card[data-site="tools"]:hover .card-link {
    background: var(--color-tool);
    border-color: var(--color-tool);
    color: #0A0A0F;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.site-card[data-site="games"]:hover {
    border-color: var(--color-game);
    box-shadow: var(--glow-card), 0 0 40px rgba(255, 171, 0, 0.2);
}

.site-card[data-site="games"]:hover .card-link {
    background: var(--color-game);
    border-color: var(--color-game);
    color: #0A0A0F;
    box-shadow: 0 0 20px rgba(255, 171, 0, 0.4);
}

.site-card[data-site="claw"]:hover {
    border-color: var(--color-claw);
    box-shadow: var(--glow-card), 0 0 40px rgba(255, 64, 129, 0.2);
}

.site-card[data-site="claw"]:hover .card-link {
    background: var(--color-claw);
    border-color: var(--color-claw);
    color: #0A0A0F;
    box-shadow: 0 0 20px rgba(255, 64, 129, 0.4);
}

.site-card[data-site="nadal"]:hover {
    border-color: var(--color-nadal);
    box-shadow: var(--glow-card), 0 0 40px rgba(120, 144, 156, 0.2);
}

.site-card[data-site="nadal"]:hover .card-link {
    background: var(--color-nadal);
    border-color: var(--color-nadal);
    color: #0A0A0F;
    box-shadow: 0 0 20px rgba(120, 144, 156, 0.4);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.8) 100%);
    padding: var(--spacing-lg) 0;
    text-align: center;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer p {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* Responsive */
@media (max-width: 1024px) {
    .site-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .header {
        padding: var(--spacing-lg) 0;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .tagline {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .site-grid {
        grid-template-columns: 1fr;
    }
    
    .site-card {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .main {
        padding: var(--spacing-lg) 0;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.site-card:nth-child(1) { animation-delay: 0.1s; }
.site-card:nth-child(2) { animation-delay: 0.2s; }
.site-card:nth-child(3) { animation-delay: 0.3s; }
.site-card:nth-child(4) { animation-delay: 0.4s; }

/* Scanline Effect */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 212, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 212, 255, 0.03) 3px
        );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.3;
}
