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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0a0e1a;
    color: #e0e6ed;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1f2e 0%, #151922 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.header-controls {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.notification-btn,
.test-notification-btn {
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.notification-btn:hover,
.test-notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.4);
}

.notification-btn.enabled {
    background: linear-gradient(135deg, #00c851 0%, #00ff68 100%);
}

.notification-icon {
    font-size: 1.2em;
}

.current-time {
    font-size: 1.2em;
    color: #00d4ff;
    margin: 10px 0;
    font-weight: 500;
}

.timezone-info {
    color: #6c757d;
    font-size: 0.9em;
}

/* Exchange Grid */
.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Exchange Card Styles */
.exchange-card {
    background: linear-gradient(135deg, #1a1f2e 0%, #151922 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: move;
    position: relative;
    overflow: hidden;
}

.exchange-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a9eff, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.exchange-card:hover::before {
    transform: translateX(100%);
}

.exchange-card.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.5);
}

.exchange-card.drag-over {
    border: 2px dashed #4a9eff;
}

.exchange-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.exchange-info h2 {
    font-size: 1.3em;
    color: #e0e6ed;
    margin-bottom: 5px;
}

.exchange-abbr {
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
}

/* Status Badge */
.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.status-open {
    background: linear-gradient(135deg, #00c851 0%, #00ff68 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 200, 81, 0.4);
}

.status-closed {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 68, 68, 0.4);
}

/* Countdown Styles */
.countdown-label {
    color: #6c757d;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.countdown {
    font-size: 2em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

/* Exchange Details */
.exchange-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: #6c757d;
    font-size: 0.8em;
    margin-bottom: 2px;
}

.detail-value {
    color: #e0e6ed;
    font-size: 0.95em;
    font-weight: 500;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: rgba(26, 31, 46, 0.5);
    border-radius: 8px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.open {
    background: linear-gradient(135deg, #00c851 0%, #00ff68 100%);
}

.legend-dot.closed {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.drag-hint {
    font-style: italic;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .exchange-grid {
        grid-template-columns: 1fr;
    }

    .header-controls {
        flex-direction: column;
        align-items: center;
    }

    .notification-btn,
    .test-notification-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .footer {
        padding: 30px 15px;
    }

    .notification-demo h3 {
        font-size: 1.5em;
    }

    .footer-test-btn {
        padding: 12px 30px;
        font-size: 1em;
    }

    .server-options {
        grid-template-columns: 1fr;
    }

    .option code {
        font-size: 0.8em;
        word-break: break-all;
    }
}

/* Animation for state changes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.status-change {
    animation: pulse 0.5s ease-in-out;
}

/* Footer Styles */
.footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1318 100%);
    border-top: 1px solid rgba(74, 158, 255, 0.2);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.notification-demo {
    margin-bottom: 30px;
}

.notification-demo h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.notification-demo p {
    color: #6c757d;
    margin-bottom: 20px;
}

.footer-test-btn {
    position: relative;
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
}

.footer-test-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.5);
}

.footer-test-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.4em;
    animation: wiggle 2s ease-in-out infinite;
}

.btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(0);
    animation: pulseRipple 3s ease-out infinite;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes pulseRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.notification-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-text {
    color: #ffc107;
    margin-bottom: 15px;
    font-weight: 500;
}

.server-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.option {
    background: rgba(26, 31, 46, 0.8);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.option strong {
    color: #4a9eff;
    display: block;
    margin-bottom: 5px;
}

.option code {
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #00d4ff;
    display: inline-block;
    margin-top: 5px;
}

.option span {
    color: #6c757d;
    font-size: 0.9em;
}

/* Accessibility */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-to-main:focus {
    top: 6px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header subtitle */
.header-subtitle {
    font-size: 1.1em;
    color: #888;
    margin: 0.5em 0 1.5em 0;
    text-align: center;
}

/* Content sections */
.market-info {
    max-width: 1200px;
    margin: 3em auto 2em;
    padding: 2em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.info-content h3 {
    color: #4CAF50;
    margin-top: 2em;
    margin-bottom: 1em;
}

.exchanges-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5em;
    margin: 1em 0;
}

.exchanges-list li {
    padding: 0.5em 0;
}

/* Footer improvements */
.footer-links {
    margin-top: 2em;
    text-align: center;
}

.footer-links nav a {
    margin: 0 1em;
    color: #888;
    text-decoration: none;
}

.footer-links nav a:hover {
    color: #4CAF50;
}

.copyright {
    margin-top: 1em;
    color: #666;
    font-size: 0.9em; }
