/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.025em;
    overflow-x: hidden;
}

/* Theme variables matching the main site */
:root {
    --background: hsl(0, 0%, 98%);
    --foreground: hsl(0, 0%, 20%);
    --card: hsl(0, 0%, 96%);
    --card-foreground: hsl(0, 0%, 20%);
    --primary: hsl(0, 0%, 25%);
    --primary-foreground: hsl(0, 0%, 98%);
    --muted: hsl(0, 0%, 88%);
    --muted-foreground: hsl(0, 0%, 45%);
    --accent: hsl(0, 0%, 25%);
    --border: hsl(0, 0%, 85%);
    --radius: 0.5rem;
}

/* Background and grid matching main site */
.bg-background {
    background: var(--background);
    color: var(--foreground);
    min-height: 100vh;
}

.cosmic-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(64, 64, 64, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 64, 64, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

/* Gradient glow effect matching main site */
.gradient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 2;
    pointer-events: none;
}

.gradient-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
}

/* Particle canvas */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* Main section styling */
#coming-soon {
    position: relative;
    z-index: 10;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.7s ease-out 0.3s both;
}

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

/* Status badge styling */
.pulse-dot {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-spinner {
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--muted);
    border-top: 1.5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typewriter effect */
.typewriter-text {
    display: inline-block;
}

.typewriter-cursor {
    display: inline-block;
    opacity: 0;
    animation: blink 1s infinite;
}

#description-cursor {
    opacity: 0;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Slide up animations */
.slide-up-delayed,
.slide-up-delayed-2,
.slide-up-delayed-3,
.slide-up-final {
    transition: all 0.6s ease-out;
    transform: translateY(20px);
}

/* Cosmic card matching main site */
.cosmic-card {
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cosmic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Input and button styling matching main site */
.email-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    min-width: 200px;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px hsl(from var(--primary) h s l / 0.1);
}

.email-input::placeholder {
    color: var(--muted-foreground);
}

.notify-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.notify-btn:hover {
    background: hsl(from var(--primary) h s calc(l - 5%));
    transform: translateY(-1px);
}

.notify-btn:active {
    transform: translateY(0);
}

.notify-btn span {
    position: relative;
    z-index: 2;
}

/* Cosmic glow effect matching main site */
.cosmic-glow {
    position: relative;
}

.cosmic-glow::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(64, 64, 64, 0.08) 0%, transparent 70%);
    z-index: -1;
    border-radius: inherit;
}

/* Responsive design */
@media (max-width: 768px) {
    .email-input,
    .notify-btn {
        width: 100%;
    }
    
    .gradient-glow {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    #coming-soon {
        padding: 1rem;
    }
    
    .cosmic-card {
        margin: 0 1rem;
    }
}

/* Success and loading states */
.notify-btn.success {
    background: #10b981;
    color: white;
}

.notify-btn.success:hover {
    background: #059669;
}

.notify-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Utility classes matching main site */
.text-balance {
    text-wrap: balance;
}

/* Additional spacing utilities */
.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-24 > * + * {
    margin-top: 6rem;
}

.space-y-18 > * + * {
    margin-top: 5.125rem;
}

.space-y-20 > * + * {
    margin-top: 5rem;
}

.space-y-26 > * + * {
    margin-top: 6.5rem;
}

.space-y-28 > * + * {
    margin-top: 7rem;
}

.space-y-32 > * + * {
    margin-top: 8rem;
}

.gap-3 {
    gap: 0.75rem;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

/* Responsive text sizing matching main site patterns */
.text-4xl { font-size: 4rem; }
.text-2xl { font-size: 3rem; }
.text-xl { font-size: 2rem; }
.text-lg { font-size: 1.5rem; }
.text-xs { font-size: 0.75rem; }

@media (min-width: 768px) {
    .md\\:text-6xl { font-size: 7rem; }
    .md\\:text-3xl { font-size: 3.5rem; }
    .md\\:text-xl { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
    .lg\\:text-7xl { font-size: 9rem; }
}

/* Typography utilities */
.font-medium { font-weight: 500; }
.tracking-tighter { letter-spacing: -0.05em; }

/* Color utilities */
.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-muted-foreground { color: var(--muted-foreground); }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--primary); }
.border-border { border-color: var(--border); }

/* Layout utilities */
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* Border and radius utilities */
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }

/* Spacing utilities */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.pt-6 { padding-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

/* Sizing utilities */
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-400 { min-height: 400px; }

/* Additional layout utilities */
.overflow-hidden { overflow: hidden; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Flex utilities */
.flex-1 { flex: 1 1 0%; }

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\\:flex-row { flex-direction: row; }
}

@media (min-width: 768px) {
    .md\\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
    .md\\:px-12 { padding-left: 3rem; padding-right: 3rem; }
}

/* Opacity utilities */
.opacity-0 { opacity: 0; }

/* Display utilities */
.inline-flex { display: inline-flex; }
.block { display: block; }
.hidden { display: none; }

/* Position utilities */
.absolute { position: absolute; }
.fixed { position: fixed; }

/* Inset utilities */
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }

/* Scroll spacer */
.scroll-spacer {
    height: 0;
    margin-top: -30vh;
}

/* Dashboard section */
.dashboard-section {
    padding: 6rem 0;
    position: relative;
    z-index: 10;
}

/* Voting Dashboard Styles */
.voting-dashboard {
    background: var(--card);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background-color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-square {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.125rem;
    background-color: var(--foreground);
}

.dashboard-title span {
    color: var(--foreground);
    font-weight: 500;
}

.user-avatars {
    display: flex;
    gap: -0.5rem;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--muted);
    border: 2px solid var(--card);
    margin-left: -0.25rem;
}

.dashboard-content {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 16rem;
    border-right: 1px solid var(--border);
    padding: 1rem;
    background: var(--card);
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--muted);
}

.nav-item.active {
    background-color: var(--muted);
    color: var(--foreground);
}

.nav-icon {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.125rem;
    background-color: currentColor;
    opacity: 0.6;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.main-content {
    flex: 1;
    padding: 1rem;
    background: var(--background);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left h3 {
    font-weight: 500;
    color: var(--foreground);
}

.poll-count {
    font-size: 0.75rem;
    background-color: var(--muted);
    color: var(--muted-foreground);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.polls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.poll-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.poll-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.poll-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.poll-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.4;
    margin: 0;
}

.poll-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background-color: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

.poll-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.poll-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.75rem;
}

.due-date {
    color: #f59e0b;
    font-weight: 500;
}

.vote-count {
    color: var(--muted-foreground);
}

.voting-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vote-btn {
    background: none;
    border: 2px solid;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.yes-btn {
    border-color: rgba(34, 197, 94, 0.3);
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.yes-btn:hover {
    background-color: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.no-btn {
    border-color: rgba(239, 68, 68, 0.3);
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.no-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.vote-btn.being-clicked {
    transform: scale(0.98);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.vote-btn > span {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.vote-progress {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, currentColor 0%, rgba(255,255,255,0.8) 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.vote-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
}

/* Mouse cursor animation */
.mouse-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1000;
    pointer-events: none;
    display: none;
    transition: all 0.1s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000000'%3E%3Cpath d='M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.45,2.08 7.62,2.22L18.78,12.22C19.28,12.66 19.28,13.42 18.78,13.86L15.19,17.05L13.92,21.5C13.69,22 13.09,22.21 12.59,21.97L13.64,21.97Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.mouse-cursor.clicking {
    animation: clickPulse 0.3s ease;
}

@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* DeFund Logo in top right */
.defund-logo {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    z-index: 50;
    color: var(--foreground);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.defund-logo:hover {
    opacity: 1;
}

.defund-logo svg {
    width: 100%;
    height: 100%;
}

/* Responsive design for dashboard */
@media (max-width: 768px) {
    .dashboard-content {
        flex-direction: column;
        min-height: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .polls-grid {
        grid-template-columns: 1fr;
    }
    
    .scroll-spacer {
        height: 0;
        margin-top: -10vh;
    }
}

/* Portfolio Styles */
.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--foreground);
}

.stat-value.positive {
    color: #22c55e;
}

.stat-value.negative {
    color: #ef4444;
}

.portfolio-list h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.position-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.position-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.position-info {
    flex: 1;
}

.position-name {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.position-details {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.position-change {
    font-size: 1rem;
    font-weight: 600;
}

.position-change.positive {
    color: #22c55e;
}

.position-change.negative {
    color: #ef4444;
}

/* Analytics Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.analytics-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.big-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.big-stat.positive {
    color: #22c55e;
}

.stat-subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--muted);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.mini-chart {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 40px;
}

.mini-chart .bar {
    flex: 1;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    border-radius: 2px 2px 0 0;
    min-height: 8px;
    transition: height 0.3s ease;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.category-stat {
    font-weight: 600;
    color: var(--foreground);
}

.recent-activity {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.recent-activity h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.activity-icon.win {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.activity-icon.win::before {
    content: '↗';
}

.activity-icon.vote {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.activity-icon.vote::before {
    content: '✓';
}

.activity-icon.loss {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.activity-icon.loss::before {
    content: '↘';
}

.activity-text {
    flex: 1;
}

.activity-text > div:first-child {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Responsive updates for new sections */
@media (max-width: 768px) {
    .portfolio-stats {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}