:root {
    --bg-color: #0a0a0f;
    --glass-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9494a0;
    --accent-1: #6366f1;
    --accent-2: #ec4899;
    --accent-3: #8b5cf6;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

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

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Main Content */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -1px;
}

h1 span {
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Cards */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.unit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.unit-card:hover::before {
    opacity: 1;
}

.unit-card#unit2:hover .arrow { color: var(--accent-1); transform: translateX(5px); }
.unit-card#unit3:hover .arrow { color: var(--accent-2); transform: translateX(5px); }

.card-content {
    text-align: left;
    position: relative;
    z-index: 1;
}

.card-content h2 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

.arrow {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    .glass-panel { padding: 2rem; }
    h1 { font-size: 2rem; }
    .unit-card { padding: 1.25rem; }
}

/* Dev Controls & Modals */
.dev-login-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.dev-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.dev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s;
}

.dev-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-style: solid;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    animation: none; /* overrides slideUp from .glass-panel to avoid weird re-trigger */
    width: 90%;
    max-width: 400px;
    padding: 2rem;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent-1);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: var(--accent-1);
    color: white;
}
.modal-btn.primary:hover {
    background: var(--accent-3);
}

.modal-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.error-text {
    color: var(--accent-2);
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
}
.error-text.hidden {
    display: none;
}

/* Delete button for custom cards */
.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--accent-2);
    color: white;
    border-color: var(--accent-2);
}
