/* SatoshiSwap Page Styles - Premium UI */

/* Remove arrow input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* ========================================
   Stat Cards
   ======================================== */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Swap Card
   ======================================== */
.swap-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.swap-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f97316, #ea580c, #dc2626, #f97316);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* ========================================
   Tabs
   ======================================== */
.swap-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #94a3b8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.swap-tab:hover {
    color: white;
    background: rgba(51, 65, 85, 0.5);
}

.swap-tab.active {
    background: #1e293b;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Token Input Section
   ======================================== */
.token-input-section {
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 1rem;
    padding: 1rem;
    margin: 0.5rem;
    transition: all 0.2s ease;
}

.token-input-section:hover {
    border-color: rgba(71, 85, 105, 0.6);
}

.token-input-section:focus-within {
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

/* ========================================
   Token Selector
   ======================================== */
.token-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.token-selector:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(71, 85, 105, 0.8);
    transform: scale(1.02);
}

.token-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Token Input
   ======================================== */
.token-input {
    background: transparent;
    text-align: right;
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    width: 100%;
    outline: none;
}

.token-input::placeholder {
    color: #334155;
}

/* ========================================
   Buttons
   ======================================== */
.max-btn {
    font-size: 0.625rem;
    font-weight: 700;
    color: #f97316;
    text-transform: uppercase;
    background: rgba(249, 115, 22, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.max-btn:hover {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.switch-btn {
    background: rgba(15, 23, 42, 1);
    border: 4px solid rgba(2, 6, 23, 1);
    padding: 0.5rem;
    border-radius: 0.75rem;
    color: #64748b;
    transition: all 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.switch-btn:hover {
    color: #f97316;
    transform: scale(1.1) rotate(180deg);
}

.swap-action-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.swap-action-btn:hover {
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.5);
    transform: translateY(-2px);
}

.swap-action-btn:active {
    transform: scale(0.98);
}

.swap-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Swap Details
   ======================================== */
.swap-details {
    padding: 0.75rem;
    background: rgba(2, 6, 23, 0.5);
    border-radius: 0.5rem;
    margin: 0.5rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

/* ========================================
   Slippage Buttons
   ======================================== */
.slippage-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.slippage-btn:hover {
    opacity: 0.8;
}

/* ========================================
   Glass Panel
   ======================================== */
.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 1.5rem;
}

/* ========================================
   Chart Timeframe Buttons
   ======================================== */
.chart-timeframe {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.chart-timeframe:hover {
    color: white;
    background: rgba(51, 65, 85, 0.5);
}

.chart-timeframe.active {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

/* ========================================
   Token Modal Item
   ======================================== */
.token-modal-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.token-modal-item:hover {
    background: rgba(51, 65, 85, 0.5);
}

.token-modal-item.selected {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* ========================================
   Limit Order Item
   ======================================== */
.limit-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.limit-order-item:hover {
    border-color: rgba(51, 65, 85, 0.5);
}

.limit-order-item .cancel-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 0.625rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.limit-order-item .cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ========================================
   Swap History Item
   ======================================== */
.swap-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.swap-history-item:hover {
    border-color: rgba(51, 65, 85, 0.5);
    transform: translateX(4px);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .stat-card {
        padding: 0.75rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .token-input {
        font-size: 1.5rem;
    }

    .swap-action-btn {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* ========================================
   Shake Animation
   ======================================== */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* ========================================
   Success Overlay
   ======================================== */
.success-popup {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 1.5rem;
    padding: 2rem 3rem;
    text-align: center;
    animation: popIn 0.3s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

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

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

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.success-icon {
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

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