/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #050510;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a3a 0%, #050510 100%);
    z-index: -1;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent url('data:image/svg+xml;utf8,%3Csvg width="40" height="40" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h40v40H0z" fill="none"/%3E%3Cpath d="M0 40L40 0H20L0 20M40 40V20L20 40" stroke="%23303050" stroke-width="1" stroke-opacity="0.3"/%3E%3C/svg%3E') repeat;
    animation: bgRotate 60s linear infinite;
    opacity: 0.2;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* Helper Class for Text Gradient */
.text-gradient {
    background: linear-gradient(to right, #00f2ff, #00c3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Header & Title */
header {
    margin-bottom: 60px;
    text-align: center;
}

h1.glitch-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5), 0 0 20px rgba(0, 242, 255, 0.3);
    position: relative;
    letter-spacing: 2px;
}

/* Mobile Responsive Title */
@media (max-width: 768px) {
    h1.glitch-title {
        font-size: 1.8rem;
    }
}

/* Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styling */
.card {
    position: relative;
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 242, 255, 0.15);
    border-color: rgba(0, 242, 255, 0.3);
}

.card-content {
    z-index: 2;
    width: 100%;
}

.icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(0, 195, 255, 0));
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(0, 195, 255, 0.05));
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.card-icon {
    width: 32px;
    height: 32px;
    color: #00f2ff;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #fff;
    transition: color 0.3s;
}

.card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.card:hover h2 {
    color: #00f2ff;
}

/* Animated Border Effect */
.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.card:hover .card-border::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #00f2ff);
    animation: spin 4s linear infinite;
    opacity: 0.3;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Click Feedback */
.card:active {
    transform: scale(0.98);
}
