/* =============================================================================
   ODEX ADMIN PANEL - СТИЛЬ КАК НА XODEX.ORG
   ============================================================================= */

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

:root {
    --primary-color: #7c3aed;    /* Фиолетовый как на xodex.org */
    --primary-hover: #6d28d9;
    --secondary-color: #1f2937;
    --background-dark: #0f172a;
    --background-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --accent-color: #06b6d4;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* =============================================================================
   ЭКРАН ПОДКЛЮЧЕНИЯ - В СТИЛЕ XODEX
   ============================================================================= */

.connect-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-dark) 0%, #1e1b4b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.connect-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.connect-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.connect-header h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.connect-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

.connect-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.connect-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -12px rgba(124, 58, 237, 0.3);
}

.connect-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.connect-card h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.connect-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.125rem;
}

.connect-main-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.connect-main-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.connect-main-btn:hover::before {
    left: 100%;
}

.connect-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.4);
}

.admin-info {
    margin-bottom: 1.5rem;
}

.info-card {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: left;
}

.info-card strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contract-address {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--accent-color);
    word-break: break-all;
}

/* =============================================================================
   ЭКРАН ОТКАЗА В ДОСТУПЕ
   ============================================================================= */

.access-denied-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-dark) 0%, #1e1b4b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.access-denied-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(239, 68, 68, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.denied-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.denied-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    color: var(--error-color);
}

.denied-container h1 {
    color: var(--error-color);
    font-size: 2.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.denied-container p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 1.125rem;
}

.denied-info {
    margin: 2rem 0;
}

.retry-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.4);
}

.fuck-off-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: var(--error-color);
    font-weight: 700;
    font-size: 1.125rem;
}

/* =============================================================================
   ОСНОВНАЯ АДМИН ПАНЕЛЬ - В СТИЛЕ XODEX
   ============================================================================= */

.admin-container {
    min-height: 100vh;
    background: var(--background-dark);
    position: relative;
}

.admin-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Шапка админ панели */
.admin-header {
    padding: 1.5rem 0;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.logo-section h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.logo-section .subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

.wallet-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wallet-info-header .address {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--primary-color);
}

.admin-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.disconnect-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Основное содержимое */
.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Стили для блока информации о сети */
.network-info-section {
    margin: 1.25rem 0;
}

.network-info-section div {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.network-info-section button {
    margin-left: 0.625rem;
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Быстрая статистика */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-color: var(--primary-color);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-description {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Основные разделы */
.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-section {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.admin-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.admin-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.admin-section.warning-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: var(--error-color);
}

.admin-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Управление комиссиями */
.fee-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group label {
    font-weight: 600;
    color: var(--accent-color);
}

.admin-input {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: monospace;
    transition: all 0.3s ease;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-note {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

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

.admin-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.admin-btn:hover::before {
    left: 100%;
}

.admin-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.admin-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.admin-btn.secondary {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.admin-btn.secondary:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.admin-btn.danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: white;
}

.admin-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}

/* Управление парами */
.pair-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-weight: 600;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.pair-status {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--success-color);
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4);
}

/* Список пулов */
.pools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.pool-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    font-family: monospace;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.pool-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.pool-tokens {
    font-weight: 600;
    color: var(--primary-color);
}

.pool-address {
    color: var(--text-muted);
    font-size: 0.625rem;
}

.pool-reserves {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.pool-liquidity {
    color: var(--accent-color);
    font-weight: 600;
}

/* Управление владельцем */
.warning-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--error-color);
    font-weight: 600;
}

.warning-note {
    color: var(--error-color);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.modal-message {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4);
}

.modal-btn.secondary {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn.secondary:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--primary-color);
}

/* Утилиты */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .wallet-info-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .pair-actions {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .connect-header h1 {
        font-size: 2.5rem;
    }
    
    .connect-card {
        padding: 2rem;
    }
}
