:root {
    --primary-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    --text-color: #ffffff;
    --item-bg: rgba(255, 255, 255, 0.1);
    --gradient-color-1: #ff6b6b;
    --gradient-color-2: #4ecdc4;
    --gradient-color-3: #45b7d1;
    --gradient-color-4: #96c93d;
}

[data-theme="dark"] {
    --text-color: #e0e0e0;
    --item-bg: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(45deg, var(--gradient-color-1), var(--gradient-color-2), var(--gradient-color-3), var(--gradient-color-4));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    transition: background-color 0.3s ease;
    position: relative;
}

body.loading::after {
    content: 'Loading...';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 1000;
}

.theme-toggle, .info-button {
    position: fixed;
    padding: 10px 20px;
    background: var(--item-bg);
    border: none;
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 10;
}

.theme-toggle {
    top: 20px;
    right: 20px;
}

.info-button {
    bottom: 20px;
    left: 20px;
}

.theme-toggle:hover, .info-button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 800px;
    width: 90%;
}

.item {
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: var(--text-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    margin: 15px 0;
    opacity: 0;
    transform: translateY(20px);
    text-decoration: none;
    display: block;
    padding: 15px 25px;
    background: var(--item-bg);
    border-radius: 8px;
    box-shadow: var(--primary-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px);
}

.item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--hover-shadow);
    background: rgba(255, 255, 255, 0.2);
}

.item:nth-child(1) { animation: fadeInUp 0.8s ease forwards 0.2s; }
.item:nth-child(2) { animation: fadeInUp 0.8s ease forwards 0.4s; }
.item:nth-child(3) { animation: fadeInUp 0.8s ease forwards 0.6s; }
.item:nth-child(4) { animation: fadeInUp 0.8s ease forwards 0.8s; }
.item:nth-child(5) { animation: fadeInUp 0.8s ease forwards 1.0s; }
.item:nth-child(6) { animation: fadeInUp 0.8s ease forwards 1.2s; }
.item:nth-child(7) { animation: fadeInUp 0.8s ease forwards 1.4s; }

.modal, .theme-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content, .theme-modal-content {
    background: var(--item-bg);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--primary-shadow);
    animation: modalFadeIn 0.5s ease;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.modal-content p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: var(--text-color);
}

.theme-modal-content label {
    display: block;
    margin: 10px 0 5px;
    font-size: 1rem;
    color: var(--text-color);
}

.theme-modal-content input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
}

.close-button, .theme-close-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.close-button:hover, .theme-close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    .item {
        font-size: 1.5rem;
        padding: 12px 20px;
    }

    .theme-toggle, .info-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .modal-content, .theme-modal-content {
        padding: 20px;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
