:root {
    --geist-background: #000000;
    --geist-foreground: #ededed;
    --geist-secondary: #888888;
    --geist-border: #333333;
    --geist-success: #f5a623; /* Vercel Yellow Accent */
    --geist-card-bg: #0a0a0a;
}

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

body {
    background-color: var(--geist-background);
    color: var(--geist-foreground);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Auth Bar Styles */
.auth-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--geist-background);
    border-bottom: 1px solid var(--geist-border);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.auth-bar input {
    background: var(--geist-card-bg);
    border: 1px solid var(--geist-border);
    color: var(--geist-foreground);
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 8px;
    font-family: inherit;
    font-size: 0.85rem;
}

.auth-bar input:focus {
    outline: none;
    border-color: var(--geist-success);
}

.auth-bar button {
    background: var(--geist-foreground);
    color: var(--geist-background);
    border: 1px solid var(--geist-foreground);
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.auth-bar button:hover {
    background: #d4d4d4;
}

#register-btn, #logout-btn {
    background: transparent;
    color: var(--geist-foreground);
    border: 1px solid var(--geist-border);
}

#register-btn:hover, #logout-btn:hover {
    background: var(--geist-card-bg);
    border-color: var(--geist-secondary);
}

.welcome-text {
    font-size: 0.85rem;
    margin-right: 16px;
    color: var(--geist-secondary);
}

.welcome-text strong {
    color: var(--geist-foreground);
}

/* Page Layout (Sidebar + Main) */
.page-layout {
    display: flex;
    flex: 1;
    width: 100%;
    margin-top: 55px; /* Offset for auth bar */
}

/* Live Feed Sidebar */
.live-feed {
    width: 280px;
    background: var(--geist-background);
    border-right: 1px solid var(--geist-border);
    height: calc(100vh - 55px);
    position: sticky;
    top: 55px;
    display: flex;
    flex-direction: column;
}

.feed-header {
    padding: 16px;
    border-bottom: 1px solid var(--geist-border);
}

.feed-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--geist-foreground);
    letter-spacing: -0.01em;
}

.feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-list::-webkit-scrollbar {
    width: 6px;
}

.feed-list::-webkit-scrollbar-thumb {
    background: var(--geist-border);
    border-radius: 3px;
}

.feed-placeholder {
    font-size: 0.8rem;
    color: var(--geist-secondary);
    font-style: italic;
}

.feed-item {
    font-size: 0.8rem;
    color: var(--geist-secondary);
    line-height: 1.5;
    animation: slide-right 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(-10px);
}

@keyframes slide-right {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feed-item strong {
    color: var(--geist-foreground);
    font-weight: 500;
}

.feed-item.login strong {
    color: var(--geist-success);
}

/* Main Content */
.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.cluster-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    width: 100%;
}

.cluster-header {
    margin-bottom: 24px;
    text-align: center;
}

.cluster-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--geist-foreground);
}

/* Checkbox Grid */
#checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 8px; 
    width: 100%;
    justify-items: center;
}

/* Vercel Style Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background-color: var(--geist-background);
    border: 1px solid var(--geist-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="checkbox"]:hover {
    border-color: #666666;
}

input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--geist-success);
    outline-offset: 2px;
}

input[type="checkbox"]:checked {
    background-color: var(--geist-success);
    border-color: var(--geist-success);
}

input[type="checkbox"]:checked:hover {
    filter: brightness(1.1);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 11px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1.5px);
}

.checkbox-enter {
    animation: fade-in 0.3s ease forwards;
    opacity: 0;
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Custom Tooltip */
.custom-tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--geist-foreground);
    color: var(--geist-background);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transform: translate(-50%, calc(-100% + 4px));
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.custom-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -100%);
}

/* Vercel Style Toasts */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.toast {
    background: var(--geist-background);
    color: var(--geist-foreground);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--geist-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #e5484d;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 800px) {
    .page-layout { flex-direction: column; }
    .live-feed { width: 100%; height: 200px; position: static; border-right: none; border-bottom: 1px solid var(--geist-border); }
    .main-container { padding: 2rem 1rem; }
    #checkbox-container { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); }
    input[type="checkbox"] { width: 24px; height: 24px; border-radius: 4px; }
}
