/* CSS Variables for theming */
:root {
    --color-primary: #ffd700;
    --color-secondary: #d4af37;
    --color-text: #f5f5dc;
    --color-text-muted: #e8d5c4;
    --bg-overlay: rgba(0, 0, 0, 0.1);
    --bg-gradient: linear-gradient(145deg, rgba(26, 26, 46, 0.7), rgba(15, 52, 96, 0.7));
    --bg-gradient-hover: linear-gradient(145deg, rgba(26, 26, 46, 0.8), rgba(15, 52, 96, 0.8));
    --bg-gradient-overlay: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6), transparent);
    --transition-standard: all 0.3s ease;
    --font-primary: 'Cinzel', serif;
    --shadow-text: 0 1px 2px rgba(0, 0, 0, 0.5);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 15px;
    --spacing-xs: 0.3rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.8rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    
    /* Legacy variables for compatibility */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #f5f5dc;
    --text-secondary: #e8d5c4;
    --text-muted: #c4b5a0;
    --accent-primary: #ffd700;
    --accent-hover: #d4af37;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-tertiary: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #d97706;
    --accent-hover: #b45309;
    --border-color: #cbd5e1;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent-primary: #60a5fa;
    --accent-hover: #3b82f6;
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-attachment: fixed;
}

/* Three-layer background sandwich */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 40% 60%, rgba(255, 20, 147, 0.06) 0%, transparent 70%),
        radial-gradient(circle at 60% 40%, rgba(138, 43, 226, 0.05) 0%, transparent 70%),
        radial-gradient(circle at 90% 10%, rgba(0, 191, 255, 0.07) 0%, transparent 70%),
        radial-gradient(circle at 10% 90%, rgba(50, 205, 50, 0.04) 0%, transparent 70%),
        linear-gradient(135deg, 
            var(--bg-primary) 0%, 
            var(--bg-secondary) 50%, 
            var(--bg-primary) 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    animation: colorShift 20s ease-in-out infinite;
    transition: var(--transition);
}

[data-theme="light"] body::before {
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.12) 0%, transparent 70%),
        radial-gradient(circle at 40% 60%, rgba(255, 20, 147, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 60% 40%, rgba(138, 43, 226, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 90% 10%, rgba(0, 191, 255, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 10% 90%, rgba(50, 205, 50, 0.06) 0%, transparent 70%),
        linear-gradient(135deg, 
            var(--bg-primary) 0%, 
            var(--bg-secondary) 50%, 
            var(--bg-primary) 100%);
}

/* Gaussian blur overlay for frosted glass effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: rgba(0, 0, 0, 0.1);
    /*backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); */
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

[data-theme="light"] .header {
    border-bottom: 1px solid rgba(217, 119, 6, 0.3);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.theme-icon {
    font-size: 1.25rem;
    transition: var(--transition);
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Services grid */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.service-card {
    background: rgba(26, 26, 46, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-origin: center;
    will-change: transform;
    display: block;
    text-decoration: none;
    color: inherit;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .service-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    background: rgba(26, 26, 46, 0.4);
    border-color: rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .service-card:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem auto;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(100%);
    transition: var(--transition);
}

[data-theme="light"] .service-icon img {
    filter: brightness(0) saturate(100%) invert(0%);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-url {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    transition: var(--transition-standard);
}

.service-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.service-card:hover .service-url {
    background: rgba(255, 215, 0, 0.1);
    color: var(--color-primary);
    border-color: rgba(255, 215, 0, 0.3);
    opacity: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.service-link:hover::before {
    left: 100%;
}

/* Mobile responsive cards */
@media (max-width: 768px) {
    .service-card {
        min-height: 150px !important;
        padding: 1.25rem !important;
    }
    
    .service-url {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
}

.massive-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.massive-button:active {
    transform: translateY(1px) !important;
    transition: transform 0.1s ease !important;
}

/* Info section */
.info {
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.info-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    padding: 2rem 0;
    text-align: center;
    color: rgba(255, 215, 0, 0.6);
    font-size: 0.875rem;
}

[data-theme="light"] .footer {
    border-top: 1px solid rgba(217, 119, 6, 0.3);
    color: rgba(217, 119, 6, 0.6);
}



/* Color shifting animation */
@keyframes colorShift {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
        filter: hue-rotate(0deg) saturate(1.2);
    }
    25% {
        background-position: 20% 20%, -10% 10%, 15% -15%, -20% 20%, 10% -10%, -15% -15%, 0% 0%;
        filter: hue-rotate(15deg) saturate(1.4);
    }
    50% {
        background-position: -10% 10%, 20% -20%, -15% 15%, 15% -15%, -20% 20%, 20% 10%, 0% 0%;
        filter: hue-rotate(30deg) saturate(1.6);
    }
    75% {
        background-position: 15% -15%, -15% -15%, 20% 20%, -10% -10%, 15% 15%, -20% 20%, 0% 0%;
        filter: hue-rotate(15deg) saturate(1.4);
    }
}

/* Simple animations */
.service-icon {
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .services {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    
    .service-icon {
        width: 72px !important;
        height: 72px !important;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 80px;
        height: 80px;
    }
    
    .service-card {
        min-height: 140px !important;
        padding: 1rem !important;
    }
    
    .service-url {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .services {
        gap: 1.25rem;
    }
}

/* Animation for theme toggle */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.theme-toggle.rotating .theme-icon {
    animation: spin 0.5s ease-in-out;
}

/* Focus styles for accessibility */
.theme-toggle:focus {
    outline: none;
}

.service-link:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
