* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Animated Background */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, #eee, rgba(0,0,0,0));
    background-size: 200px 200px;
    background-position: 0 0;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes particleFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-200px); }
}

.container {
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 1s ease-out;
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 60px;
    animation: slideDown 0.8s ease-out;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 3.5em;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(120deg, #fff, #e0e0e0, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s linear infinite;
    letter-spacing: 2px;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.header p {
    font-size: 1.3em;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 10px;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 35px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: popIn 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.card::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: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8) rotateX(-20deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateX(0);
    }
}

.card:hover {
    transform: scale(1.15) translateY(-15px);
    box-shadow: 0 20px 60px 0 rgba(102, 126, 234, 0.6),
                0 0 30px 0 rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.card.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 40px 0 rgba(255, 255, 255, 0.5),
                0 0 80px 0 rgba(102, 126, 234, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

.card-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    display: block;
    text-align: center;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.card-title {
    font-size: 1.8em;
    font-weight: 800;
    text-align: center;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.submenu {
    display: none;
    animation: slideUp 0.5s ease-out;
}

.submenu.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 35px;
    padding-top: 35px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submenu-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    color: white;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.submenu-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.submenu-item:hover::before {
    opacity: 1;
}

.submenu-item:hover {
    transform: translateY(-12px) scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.sub-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    display: block;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.submenu-item:hover .sub-icon {
    transform: rotate(15deg) scale(1.3);
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.8));
}

.submenu-text {
    font-size: 1.05em;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading effect */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2em;
    }

    .main-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .submenu.show {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .card-icon {
        font-size: 2.5em;
    }
}
        /* Image preview section */
        .image-preview-section {
            display: none;
            margin-top: 25px;
            padding-top: 25px;
            border-top: 2px solid rgba(255, 255, 255, 0.2);
        }

        .submenu.show .image-preview-section {
            display: block;
        }

        .preview-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .preview-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid rgba(255, 255, 255, 0.2);
            aspect-ratio: 1;
            animation: popIn 0.4s ease-out backwards;
        }

        .preview-item:hover {
            transform: scale(1.1);
            border-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
        }

        .preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .preview-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            color: white;
            font-weight: 700;
            font-size: 0.9em;
        }

        .preview-item:hover .preview-overlay {
            opacity: 1;
        }

        .preview-label {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.85em;
            font-weight: 600;
            text-align: center;
            margin-top: 10px;
        }

        .view-all-btn {
            display: inline-block;
            margin-top: 15px;
            padding: 10px 20px;
            background: rgba(255, 255, 255, 0.15);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            color: white;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.95em;
            transition: all 0.3s ease;
            width: 100%;
            text-align: center;
        }

        .view-all-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.6);
            transform: translateY(-3px);
        }