/* Custom Styles for GoSlimStratum Web UI */

/* Navigation Links */
.nav-link {
    color: #cbd5e1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #60a5fa;
}

.nav-link.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.nav-link-mobile {
    display: block;
    color: #cbd5e1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link-mobile:hover {
    color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.05);
}

.nav-link-mobile.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Status Indicator */
.status-indicator {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #22c55e;
    flex-shrink: 0;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Card Hover Effects */
.hover-card {
    transition: all 0.2s;
}

.hover-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-0.25rem);
}

/* Table Row Hover */
.table-row-hover {
    transition: background-color 0.2s;
    cursor: pointer;
}

.table-row-hover:hover {
    background-color: rgba(248, 250, 252, 0.05);
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Mobile Menu */
@media (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}

.mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #374151;
}

.mobile-menu-button:hover {
    color: #2563eb;
    background-color: #f3f4f6;
}

.mobile-menu-button:focus {
    outline: none;
    ring: 2px;
    ring-color: #2563eb;
    ring-inset: inset;
}

/* Responsive Text */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
    }

    .text-responsive-lg {
        font-size: 1.25rem;
    }
}

/* Stat Card */
.stat-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Utilities */
.truncate-hash {
    font-family: monospace;
    font-size: 0.75rem;
    color: #4b5563;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-muted {
    color: #6b7280;
}

.text-emphasis {
    color: #111827;
    font-weight: 600;
}

/* Coin Selector Tabs */
.coin-tab {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.2s ease;
    text-decoration: none;
}

.coin-tab:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.05);
}

.coin-tab.active {
    color: #ffffff;
    background-color: #3b82f6;
}

/* Coin-specific active colors */
.coin-tab.active[data-coin="DGB"] {
    background-color: #006ad2;
}

.coin-tab.active[data-coin="BTC"] {
    background-color: #f7931a;
}

.coin-tab.active[data-coin="BCH"] {
    background-color: #8dc351;
}

.coin-tab.active[data-coin="LTC"] {
    background-color: #345d9d;
}

/* Unloaded coin tab (grayed out) */
.coin-tab.coin-tab-unloaded {
    opacity: 0.5;
}

.coin-tab.coin-tab-unloaded .coin-icon {
    filter: grayscale(100%);
}

.coin-tab.coin-tab-unloaded:hover {
    opacity: 0.7;
}

/* Unloaded but active (viewing an unloaded coin's page) */
.coin-tab.active.coin-tab-unloaded {
    background-color: #64748b;
    opacity: 0.8;
}

.coin-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    object-fit: contain;
}

.coin-label {
    font-weight: 600;
}

/* Mobile Coin Selector */
.coin-selector-mobile {
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    cursor: pointer;
}

.coin-selector-mobile:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.coin-selector-mobile option {
    background-color: #1e293b;
    color: #e2e8f0;
}

/* Collapsible Chart Sections */
.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.collapsed {
    max-height: 0 !important;
}

.collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.collapse-toggle:hover {
    background-color: rgba(156, 163, 175, 0.1);
    color: #d1d5db;
}

.collapse-toggle svg {
    transition: transform 0.3s ease;
}

.collapse-toggle.rotated svg {
    transform: rotate(-90deg);
}

/* Block Jackpot Easter Egg - Luck Trigger */
.luck-trigger {
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

.luck-trigger:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px #fbbf24);
}

/* Log Streamer Easter Egg */
.logs-easter-egg {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    text-decoration: none;
}

.logs-easter-egg:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px #60a5fa);
}

/* Slot Machine Digit Box */
.digit-box {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #fbbf24;
    text-shadow: 0 0 10px #fbbf24;
    min-width: 3.5rem;
    text-align: center;
    overflow: hidden;
}

/* Slot Machine Digit Roll Animation */
@keyframes digitRoll {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    20% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.digit-roll {
    display: inline-block;
    animation: digitRoll 0.6s ease-out forwards;
}

/* Stagger the animations for slot machine effect */
.digit-box:nth-child(1) .digit-roll { animation-delay: 0.1s; }
.digit-box:nth-child(2) .digit-roll { animation-delay: 0.3s; }
.digit-box:nth-child(3) .digit-roll { animation-delay: 0.5s; }

/* Jackpot Header Glow */
.jackpot-header {
    text-shadow: 0 0 10px #fbbf24, 0 0 20px #f59e0b;
    animation: jackpotGlow 2s ease-in-out infinite alternate;
}

@keyframes jackpotGlow {
    from {
        text-shadow: 0 0 10px #fbbf24, 0 0 20px #f59e0b;
    }
    to {
        text-shadow: 0 0 15px #fbbf24, 0 0 30px #f59e0b, 0 0 40px #d97706;
    }
}

/* Progress bar for odds display */
.odds-progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #22c55e 0%, #fbbf24 50%, #ef4444 100%);
    border-radius: 4px;
    overflow: hidden;
}

.odds-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.5s ease-out;
}

/* Lifecycle Control Buttons */
.lifecycle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lifecycle-btn-start {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.lifecycle-btn-start:hover {
    background-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.lifecycle-btn-stop {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.lifecycle-btn-stop:hover {
    background-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.lifecycle-btn-restart {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.lifecycle-btn-restart:hover {
    background-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.lifecycle-btn-unload {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.lifecycle-btn-unload:hover {
    background-color: rgba(156, 163, 175, 0.3);
    color: #d1d5db;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}
