/* Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #f8fafc;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Background Animation */
.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 alternate;
}

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

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

.globe-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    top: 40%;
    left: 40%;
    animation-delay: 4s;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 40px);
    }
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: height 0.3s ease;
}

/* Typography */
.app-title {
    font-weight: 700;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Inputs */
.custom-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px 0 0 12px;
}

.custom-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    opacity: 0.9;
    transform: translateX(2px);
}

/* Chips */
.participant-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.participant-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.participant-chip .delete-btn {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.participant-chip .delete-btn:hover {
    color: var(--accent-color);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Main Button */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-gradient:active:not(:disabled) {
    transform: translateY(0px);
}

.btn-gradient:disabled {
    background: #334155;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* Group Cards */
.group-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    min-height: 200px;
    /* Minimum height for empty group drop area */
    transition: all 0.3s;
    animation: cardEntry 0.5s ease backwards;
    display: flex;
    flex-direction: column;
}

.group-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.group-header {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    color: #cbd5e1;
}

.group-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    /* Allow list to take remaining space */
    min-height: 50px;
    /* Drop target area */
}

.group-list li {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    color: #e2e8f0;
    cursor: grab;
    background: transparent;
    border-radius: 8px;
    transition: background 0.2s;
}

.group-list li:hover {
    background: rgba(255, 255, 255, 0.03);
}

.group-list li:active {
    cursor: grabbing;
}

.group-list li:last-child {
    border-bottom: none;
}

.group-list li i {
    margin-right: 12px;
    color: var(--accent-color);
    font-size: 0.9em;
    width: 20px;
    text-align: center;
}

/* Drag and Drop Styles */
.sortable-ghost {
    opacity: 0.4;
    background: rgba(99, 102, 241, 0.1) !important;
}

.sortable-drag {
    background: rgba(99, 102, 241, 0.2) !important;
    opacity: 1;
}

.group-delete-btn {
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 0.8em;
    padding: 5px;
}

.group-delete-btn:hover {
    color: #ef4444;
}

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

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

/* Utilities */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

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

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}