:root {
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.4);
    --secondary: #00cec9;
    --dark-bg: #0f0f13;
    --card-bg: rgba(25, 25, 35, 0.7);
    --text: #dfe6e9;
    --text-muted: #b2bec3;
    --success: #00b894;
    --danger: #d63031;
    --border: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Dynamic Background */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.globe-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    left: -50px;
}

.globe-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

.globe-3 {
    width: 200px;
    height: 200px;
    background: #e056fd;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(20px) scale(1.1);
    }
}

.app-container {
    width: 100%;
    max-width: 600px;
    /* Mobile focused */
    position: relative;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.highlight {
    color: var(--secondary);
    text-shadow: 0 0 15px var(--secondary);
}

header p {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    animation: fadeInUp 0.8s ease backwards;
}

.menu-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: var(--border);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.menu-card .icon-box {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    transition: 0.3s;
}

.menu-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

.menu-card h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #74b9ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(116, 185, 255, 0.3));
}

.menu-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.highlight-card h3 {
    background: linear-gradient(90deg, #fff, #ffeaa7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 234, 167, 0.3));
}

.highlight-card {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.1));
    border-color: rgba(108, 92, 231, 0.5);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Hidden Sections */
.hidden-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.back-btn:hover {
    color: var(--text);
    transform: translateX(-5px);
}

h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.select-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.region-btn,
.size-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.region-btn:hover,
.size-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.region-btn.active,
.size-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

input[type="text"],
input[type="number"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 206, 201, 0.2);
}

.action-btn {
    width: 100%;
    background: linear-gradient(90deg, var(--primary), #8e7bf8);
    border: none;
    padding: 16px;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px var(--primary-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn:disabled,
.action-btn.disabled {
    filter: grayscale(100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.danger-btn {
    background: linear-gradient(90deg, #d63031, #ff7675);
    box-shadow: 0 5px 15px rgba(214, 48, 49, 0.4);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin-bottom: 0;
}

/* Perform Emote Config */
.config-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.uid-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.uid-input-group button.add-btn,
.uid-input-group button.remove-btn {
    width: 50px;
    background: var(--secondary);
    border: none;
    border-radius: 10px;
    color: var(--dark-bg);
    font-size: 1.2rem;
    cursor: pointer;
}

.uid-input-group button.remove-btn {
    background: var(--danger);
    color: white;
}

.save-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

.save-btn:hover {
    background: var(--success);
    color: white;
}

/* Emote Grid */
.emote-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar {
    flex: 2;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    padding-left: 40px;
    height: 50px;
}

.filter-group {
    flex: 1;
}

.filter-group select {
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    padding: 0 10px;
    outline: none;
    cursor: pointer;
}

.manual-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.manual-input button {
    width: 60px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.emote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.emote-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.emote-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    transform: scale(1.05);
}

.emote-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.emote-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Notification */
#notification-area {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(25, 25, 35, 0.95);
    border-left: 5px solid var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

/* Brand Links */
.brand-link,
.footer-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.brand-link:hover,
.footer-link:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--secondary);
    text-decoration: underline;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Mobile Optimization */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .highlight-card {
        grid-column: span 1;
    }

    .emote-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .action-btn {
        font-size: 1rem;
        padding: 14px;
    }
}