/* Modern Mobile-First Responsive Design */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-card: rgba(26, 26, 26, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #888888;
    --accent-primary: #60a5fa;
    --accent-hover: #4a90e2;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.app-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-title {
    color: var(--text-primary);
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    width: fit-content;
}

#statusCanvas {
    border-radius: 50%;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.connected .status-text {
    color: var(--success);
}

.status-indicator.disconnected .status-text {
    color: var(--danger);
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.home-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.home-btn .btn-icon {
    font-size: 1rem;
}

button.home-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Metas Ticker */
.metas-ticker-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    overflow: hidden;
}

.metas-ticker-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.metas-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.metas-ticker {
    display: flex;
    gap: 2rem;
    animation: scrollMetas 30s linear infinite;
    white-space: nowrap;
}

.metas-ticker:hover {
    animation-play-state: paused;
}

.metas-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.metas-word {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Live Streams Ticker */
.live-streams-ticker-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    overflow: hidden;
    min-height: 60px;
}

.live-streams-ticker-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.live-streams-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.live-streams-ticker {
    display: flex;
    gap: 2rem;
    animation: scrollLiveStreams 20s linear infinite;
    white-space: nowrap;
    align-items: center;
}

.live-streams-ticker:hover {
    animation-play-state: paused;
}

.live-streams-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
    height: 44px;
    transition: background-color 0.2s ease;
}

.live-streams-ticker-item:hover {
    background: var(--bg-secondary);
}

.live-streams-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Token Events Ticker */
.token-events-ticker-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    overflow: visible;
    min-height: 60px;
    position: relative;
}

.top-live-stream-slot {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.top-live-stream-content {
    flex: 1;
    min-width: 0;
}

.top-live-stream-waiting {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.top-live-stream-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.top-live-stream-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.top-live-stream-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.top-live-stream-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.top-live-stream-symbol-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.top-live-stream-symbol {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.top-live-stream-participants {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.top-live-stream-marketcap {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.top-live-stream-ath {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.new-top-stream-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(-150%);
    background: var(--success);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.new-top-stream-badge.slide-in {
    opacity: 1;
    transform: translate(-50%, -50%) translateX(0);
}

.new-top-stream-badge.slide-out {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(-150%);
}


.token-events-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.token-events-ticker {
    display: flex;
    gap: 1rem;
    white-space: nowrap;
    align-items: center;
    padding-right: 1rem;
}

.token-events-waiting {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
    padding: 0.5rem 1rem;
    text-align: center;
    width: 100%;
}

.token-events-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 56px;
    transition: background-color 0.2s ease, transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    animation: slideInFromRight 0.4s ease-out;
}

.token-events-event-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.token-events-ticker-item.slide-out {
    animation: slideOutToLeft 0.3s ease-in forwards;
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.token-events-ticker-item:hover {
    background: var(--bg-secondary);
}

.event-emoji {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-context {
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.token-events-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.token-events-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.token-events-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.token-events-symbol {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.token-events-marketcap {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.token-events-marketcap.marketcap-up {
    color: #4ade80; /* Green for increase */
}

.token-events-marketcap.marketcap-down {
    color: #f87171; /* Red for decrease */
}

.token-events-ath {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 0.125rem;
}

/* Token Event Tooltip */
.token-event-tooltip {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 280px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.token-event-tooltip-name {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.token-event-tooltip-symbol {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.token-event-tooltip-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
}

.token-event-tooltip-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.token-event-tooltip-header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
    width: 100%;
}

.token-event-tooltip-header-image {
    width: 100%;
    max-width: 240px;
    height: auto;
    max-height: 120px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.token-event-tooltip-image-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.token-event-tooltip-dex-header {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 0.25rem;
    word-wrap: break-word;
    max-width: 100%;
}

.token-event-tooltip-twitter-handle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.token-event-tooltip-thumbnail {
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 100%;
}

.token-event-tooltip-thumbnail img {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}


.live-streams-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #4ade80);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.live-streams-name {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.live-streams-mc-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    align-items: flex-start;
}

.live-streams-mc {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.live-streams-ath {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.live-streams-participants {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

@keyframes scrollLiveStreams {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Live Stream Tooltip */
.live-stream-tooltip {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    pointer-events: none;
    max-width: 320px;
    backdrop-filter: blur(10px);
    animation: fadeInTooltip 0.2s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.live-stream-tooltip-thumbnail {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.live-stream-tooltip-content {
    padding: 0.75rem 1rem;
}

.live-stream-tooltip-name {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.live-stream-tooltip-title {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Social Link Tooltip */
.social-tooltip {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    pointer-events: none;
    backdrop-filter: blur(10px);
    animation: fadeInTooltip 0.2s ease-out;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    max-width: 400px;
    word-break: break-all;
    overflow-wrap: break-word;
}

.metas-score {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(96, 165, 250, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

@keyframes scrollMetas {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Main Content */
.app-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sections */
section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

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

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Sort Options */
.sort-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sort-option-btn {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sort-option-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sort-option-btn.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: var(--text-primary);
}

.token-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
}

.resort-indicator {
    display: flex;
    align-items: center;
    width: 60px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.resort-progress-container {
    width: 100%;
    height: 100%;
    background: rgba(96, 165, 250, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.resort-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: width 1s linear;
    width: 0%;
}

.token-stats-mini {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.token-stats-mini .token-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 45px;
}

.token-stats-mini .token-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-stats-mini .token-stat-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.token-stat-tx {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.tx-buys {
    color: #4ade80; /* Green */
}

.tx-separator {
    color: var(--text-muted);
}

.tx-sells {
    color: #f87171; /* Red */
}

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

.section-header-with-action h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.btn-clear-tokens {
    padding: 0.375rem 0.75rem;
    background: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-clear-tokens:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

body[data-theme="dark"] .btn-primary,
body[data-theme="pump"] .btn-primary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--accent-primary);
    box-shadow: none;
}

body[data-theme="dark"] .btn-primary:hover,
body[data-theme="pump"] .btn-primary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.btn.delete {
    background: var(--danger);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn.delete:hover {
    background: #ef4444;
}

/* Alert Form */
.alert-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.alert-type-menu {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.alert-type-menu.active {
    display: flex;
}

.alert-type-category {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.alert-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.alert-type-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 120px;
    justify-content: center;
}

.alert-type-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.alert-type-card.selected {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 2rem;
    line-height: 1;
}

.card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.alert-type-card.selected .card-text {
    color: var(--text-primary);
}

/* Form Fields */
.form-fields {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.form-fields.active {
    display: flex;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.form-field input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-field input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-field input::placeholder {
    color: var(--text-muted);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 1.5rem;
}

.matched-tokens-section.full-width {
    width: 100%;
}

/* Alerts List */
.alerts-list-section h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.alerts-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
    width: 100%;
}

.alerts-list .dex-token-card,
.alerts-list .dex-token-placeholder {
    width: 100%;
    flex-shrink: 0;
}

.alerts-list .dex-token-card {
    padding: 1rem;
    align-items: center;
    min-height: 120px;
    height: auto;
    flex-shrink: 0;
}

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

.alerts-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.alerts-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.alerts-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.alert-item {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.alert-item .alert-info {
    width: 100%;
}

.alert-item .alert-actions {
    width: 100%;
    justify-content: stretch;
}

.alert-item .alert-actions .btn {
    flex: 1;
}

.alert-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.alert-item.active {
    border-left: 4px solid var(--success);
}

.alert-item.disabled {
    opacity: 0.6;
}

.alert-info {
    flex: 1;
    min-width: 0;
}

.alert-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

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

.alert-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    gap: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 0.75rem;
    }

    .app-header {
        padding: 1rem;
    }

    .header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .header-buttons {
        width: 100%;
    }

    .header-buttons .btn {
        flex: 1;
        min-width: 0;
    }

    section {
        padding: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .alert-type-grid {
        grid-template-columns: 1fr;
    }

    .alert-item {
        flex-direction: column;
        align-items: stretch;
    }

    .alert-actions {
        width: 100%;
        justify-content: stretch;
    }

    .alert-actions .btn {
        flex: 1;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .app-header {
        gap: 0.75rem;
    }

    .status-container {
        width: 100%;
        justify-content: center;
    }
    
    .status-indicator {
        width: 100%;
        justify-content: center;
    }
    
    .home-btn {
        width: 100%;
        justify-content: center;
    }
    
    .metas-ticker-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .metas-ticker-label {
        font-size: 0.75rem;
    }

    .live-streams-ticker-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-height: 80px;
    }
    
    .live-streams-ticker-label {
        font-size: 0.75rem;
    }

    .live-streams-ticker-item {
        height: 52px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-item {
    animation: fadeIn 0.3s ease;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .alert-type-card {
        min-height: 44px;
    }
}

/* Modal Styles - Mobile-like Interface */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.25rem 1rem;
    padding-right: 3.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
}

.modal-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-tertiary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

/* Mobile-style Button Groups */
.modal-button-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.button-group {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.group-label {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.03);
}

.button-group-buttons {
    display: flex;
    flex-direction: column;
}

.modal-action-btn {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
    min-height: 60px;
    color: var(--text-primary);
}

.modal-action-btn:first-of-type {
    border-top: none;
}

.modal-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-action-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.modal-action-btn.selected {
    background: rgba(96, 165, 250, 0.15);
}

.modal-action-btn.selected .btn-label {
    color: var(--accent-primary);
    font-weight: 600;
}

.btn-emoji {
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-label {
    flex: 1;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.btn-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Modal Form Fields */
.modal-form-fields {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.modal-form-fields.active {
    display: flex;
}

.modal-form-fields .form-field {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.modal-form-fields .form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.modal-form-fields .form-field input {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-form-fields .form-field input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Settings Modal Styles */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.settings-button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.settings-option-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.settings-option-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.settings-option-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Lower contrast for Dark and Pump themes */
body[data-theme="dark"] .settings-option-btn.active,
body[data-theme="pump"] .settings-option-btn.active {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

body[data-theme="dark"] .settings-option-btn.active:hover,
body[data-theme="pump"] .settings-option-btn.active:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.volume-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

@media (max-width: 768px) {
    .settings-button-group {
        flex-direction: column;
    }
    
    .settings-option-btn {
        width: 100%;
        min-width: unset;
    }
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.help-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.help-btn .btn-icon {
    font-size: 1.5rem;
    font-weight: 700;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.help-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.roadmap-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--accent-primary);
}

.roadmap-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roadmap-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

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

.btn-success {
    background: var(--success);
    color: var(--text-primary);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success);
    opacity: 0.9;
    cursor: default;
}

.delete-confirm-modal {
    max-width: 400px;
}

.delete-confirm-modal .modal-body {
    text-align: center;
    padding: 2rem 1.25rem;
}

.delete-confirm-modal .modal-body p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.delete-confirm-modal .modal-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.25rem 1.5rem;
}

.delete-confirm-modal .modal-actions .btn {
    flex: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
    }

    .modal-action-btn {
        min-height: 64px;
    }
}

/* Remove old alert-form styles that are no longer needed */
.alert-form {
    display: none;
}

/* Alert Tabs */
.alerts-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
}

.alert-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    bottom: -2px;
}

.alert-tab:hover {
    color: var(--text-secondary);
}

.alert-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

.alerts-tab-content {
    display: none;
}

.alerts-tab-content.active {
    display: block;
}

/* Alert Items in Modal */
.alerts-list-modal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

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

.alerts-list-modal::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.alerts-list-modal::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.alerts-list-modal::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.alert-item-modal {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.alert-item-modal:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.alert-item-modal.active {
    border-left: 4px solid var(--success);
}

.alert-item-modal.disabled {
    opacity: 0.6;
}

.alert-info-modal {
    flex: 1;
    min-width: 0;
}

.alert-name-modal {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
    white-space: pre-line;
    text-align: center;
}

.alert-details-modal {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.alert-actions-modal {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.alert-actions-modal .btn {
    flex: 1;
}

.btn-small {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Matched Tokens Section */
.matched-tokens-section h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

/* Override for alerts page - use vertical list instead of grid */
.matched-tokens-section:not(.full-width) .tokens-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 1.25rem;
    max-height: 600px;
    overflow-y: auto;
    padding-top: 0.5rem;
}

.matched-tokens-section:not(.full-width) .tokens-grid .token-card-wrapper {
    width: 100%;
    flex-shrink: 0;
}

.matched-tokens-section:not(.full-width) .tokens-grid .token-card {
    width: 100%;
}

/* Scout page - ensure grid layout */
.matched-tokens-section.full-width .tokens-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .matched-tokens-section.full-width .tokens-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .matched-tokens-section.full-width .tokens-grid {
        grid-template-columns: 1fr !important;
    }
}

.tokens-grid.resorting .dex-token-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tokens-grid::-webkit-scrollbar {
    width: 6px;
}

.tokens-grid::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.tokens-grid::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.tokens-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.token-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 80px;
    text-decoration: none;
    color: inherit;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.token-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.token-card.pulse-buy {
    animation: pulseGreen 1s ease-out;
}

.token-card.pulse-sell {
    animation: pulseRed 1s ease-out;
}

.token-card.token-complete {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
    animation: goldGlow 2s ease-in-out infinite;
}

/* Dex Token Placeholder and Card Styles */
.dex-token-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 0;
}

.dex-token-placeholder:hover {
    border-color: var(--accent-primary);
    background: rgba(96, 165, 250, 0.1);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.placeholder-icon {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 300;
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.dex-token-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}


.dex-token-card .token-name-large {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.token-image-section-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.token-image-wrapper-full {
    width: 56px;
    min-width: 56px;
    height: 56px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.token-symbol-below {
    color: var(--text-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-image-wrapper-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.token-image-placeholder-full {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

.dex-token-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.dex-token-top {
    display: flex;
    align-items: center;
    min-width: 0;
}

.token-progress-section {
    width: 100%;
    margin: 0.5rem 0;
}

.token-progress-bar-container {
    width: 100%;
}

.token-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: visible;
    margin-bottom: 0.25rem;
}

.token-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--success));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    z-index: 1;
}

.token-progress-ath-marker {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 16px;
    background: #fbbf24;
    border-radius: 1px;
    z-index: 2;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.6);
    transform: translateX(-50%);
}

.token-progress-ath-marker::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fbbf24;
}

.token-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.token-progress-label-min,
.token-progress-label-max {
    font-weight: 500;
}

.dex-token-bottom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.dex-token-main-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 0;
    min-width: 0;
}

.dex-token-header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.dex-token-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 0;
}

.dex-token-card .token-marketcap {
    color: var(--success);
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.token-social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.dex-token-card .token-social-links {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dev-bonded-info {
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

.dex-token-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.dex-token-card.has-banner {
    position: relative;
}

.token-banner-hover {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    z-index: 1000;
    pointer-events: none;
    width: 300px;
    max-width: calc(100vw - 2rem);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
}

.dex-token-card.has-banner:hover .token-banner-hover {
    display: block;
}

.token-banner-hover::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--border-color);
    z-index: 1;
}

.token-banner-hover::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--bg-card);
    z-index: 2;
}

.token-banner-hover img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.dex-token-card.pulse-buy {
    animation: pulseGreen 1s ease-out;
}

.dex-token-card.pulse-sell {
    animation: pulseRed 1s ease-out;
}

.dex-token-card.token-complete {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
    animation: goldGlow 2s ease-in-out infinite;
}

.dex-token-card.has-dex-profile {
    position: relative;
}

@keyframes goldGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
        border-color: #fbbf24;
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.7), 0 0 60px rgba(251, 191, 36, 0.5);
        border-color: #f59e0b;
    }
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
        border-color: rgba(74, 222, 128, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
        border-color: rgba(74, 222, 128, 0.8);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
        border-color: var(--border-color);
    }
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
        border-color: rgba(248, 113, 113, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(248, 113, 113, 0);
        border-color: rgba(248, 113, 113, 0.8);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
        border-color: var(--border-color);
    }
}

/* Dex payment status icons */
.dex-token-card.dex-status-processing::before {
    content: '⏳';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 24px;
    height: 24px;
    background: #fbbf24;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: spin 2s linear infinite;
}

/* Dex payment status borders - only on alerts page */
.matched-tokens-section:not(.full-width) .dex-token-card.dex-status-processing,
.alerts-list .dex-token-card.dex-status-processing {
    border-color: var(--success);
}

.matched-tokens-section:not(.full-width) .dex-token-card.dex-status-approved,
.alerts-list .dex-token-card.dex-status-approved {
    border-color: var(--success);
}

.dex-token-card.dex-status-approved::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dex-token-card.dex-status-cancelled::before {
    content: '✗';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dex-token-delete-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.dex-token-delete-btn:hover {
    background: var(--danger);
    color: var(--text-primary);
    transform: scale(1.1);
}


.token-image-wrapper {
    width: 62px;
    height: 62px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.token-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.token-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.token-main-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
}

.token-header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.token-name-section {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1 1 0;
    min-width: 0;
}

.token-card-wrapper {
    position: relative;
    width: 100%;
}

.token-alert-badge-above {
    position: absolute;
    top: calc(-0.75rem - 3px);
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 1rem);
    width: fit-content;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.token-marketcap {
    color: var(--success);
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .token-marketcap {
        font-size: 0.875rem;
    }
    
    .token-alert-badge-above {
        font-size: 0.6875rem;
        padding: 0.2rem 0.4rem;
        top: -0.6rem;
    }
    
    .token-image-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .token-name-large {
        font-size: 0.875rem;
    }
    
    .token-symbol-large {
        font-size: 0.8125rem;
    }
    
    .token-metric {
        font-size: 0.75rem;
    }
    
    .token-alert-badge {
        min-width: 100px;
        font-size: 0.6875rem;
        padding: 0.2rem 0.4rem;
    }
}

.token-marketcap {
    color: var(--success);
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.token-alert-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 120px;
    width: fit-content;
    box-sizing: border-box;
    flex-shrink: 0;
}

.token-name-large {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.token-symbol-large {
    color: var(--text-muted);
    font-size: 0.9375rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.token-metrics-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.token-metric {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.token-social-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.social-link.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.social-link:hover:not(.disabled) {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-link.twitter:hover:not(.disabled) {
    color: #1da1f2;
    border-color: #1da1f2;
}

.social-link.website:hover:not(.disabled) {
    color: var(--accent-primary);
}

.social-link.telegram:hover:not(.disabled) {
    color: #0088cc;
    border-color: #0088cc;
}

.token-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.token-delete-btn:hover {
    background: var(--danger);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* ============================================
   THEME SYSTEM
   ============================================ */

/* Dark Theme (Default) */
body[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-card: rgba(26, 26, 26, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #888888;
    --accent-primary: #60a5fa;
    --accent-hover: #4a90e2;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Ocean Theme */
body[data-theme="ocean"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(22, 33, 62, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0ff;
    --text-muted: #8888aa;
    --accent-primary: #4a9eff;
    --accent-hover: #3a8eef;
    --success: #00ff88;
    --danger: #ff0066;
    --warning: #ffaa00;
    --border-color: rgba(74, 158, 255, 0.15);
    --shadow-sm: 0 2px 4px rgba(74, 158, 255, 0.1);
    --shadow-md: 0 4px 8px rgba(74, 158, 255, 0.15);
    --shadow-lg: 0 8px 16px rgba(74, 158, 255, 0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Pump Theme */
body[data-theme="pump"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #353535;
    --bg-card: rgba(42, 42, 42, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #888888;
    --accent-primary: #4ade80;
    --accent-hover: #22c55e;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --border-color: rgba(74, 222, 128, 0.15);
    --shadow-sm: 0 2px 4px rgba(74, 222, 128, 0.1);
    --shadow-md: 0 4px 8px rgba(74, 222, 128, 0.15);
    --shadow-lg: 0 8px 16px rgba(74, 222, 128, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Button Shape Variations */
body[data-theme="ocean"] .btn {
    border-radius: var(--radius-sm);
}

/* Ocean Subtle Glow Effects */
body[data-theme="ocean"] .btn-primary {
    background: var(--accent-primary);
    box-shadow: 0 0 4px rgba(74, 158, 255, 0.2);
}

body[data-theme="ocean"] .btn-primary:hover {
    box-shadow: 0 0 6px rgba(74, 158, 255, 0.3);
    transform: translateY(-2px);
}

body[data-theme="ocean"] .app-header {
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.1);
}

body[data-theme="ocean"] .modal-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.1);
}

body[data-theme="pump"] .app-header {
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.1);
}

body[data-theme="pump"] .modal-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
}

/* Settings Theme Buttons */
.theme-buttons {
    display: flex;
    gap: 0.5rem;
}

.theme-btn.active {
    position: relative;
}

body[data-theme="ocean"] .theme-btn.active {
    box-shadow: 0 0 4px rgba(74, 158, 255, 0.2);
}

body[data-theme="pump"] .theme-btn.active {
    box-shadow: 0 0 4px rgba(74, 222, 128, 0.2);
}

/* DM Alerts Slideshow Styles */
.dm-alerts-slideshow-container {
    position: relative;
    min-height: 300px;
}

.dm-alerts-slide {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dm-alerts-slide.active {
    display: block;
}

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

.dm-alerts-slide .form-group {
    margin-bottom: 1rem;
}

.dm-alerts-slide .form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: auto;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.toast-message {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

/* Toast Type Styles */
.toast-success {
    border-left: 4px solid var(--success);
}

.toast-success .toast-icon {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
    background: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-warning .toast-icon {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.toast-info {
    border-left: 4px solid var(--accent-primary);
}

.toast-info .toast-icon {
    background: rgba(96, 165, 250, 0.2);
    color: var(--accent-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}


