/* Admin Panel Styles - Head or Tails Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #0f0f1e 100%);
    color: #fff;
    min-height: 100vh;
}

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

/* Header */
.admin-header {
    background: linear-gradient(135deg, rgba(30, 30, 63, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 2px solid #6c5ce7;
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h1 {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00cec9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.connect-btn {
    background: linear-gradient(135deg, #6c5ce7 0%, #5541d7 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.wallet-address {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 2px solid #6c5ce7;
    color: #a29bfe;
}

/* Main Content */
.admin-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Styles */
.stats-section,
.control-section {
    background: linear-gradient(135deg, rgba(30, 30, 63, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    border: 2px solid #2e2e5e;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.1);
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #a29bfe;
    margin-bottom: 25px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #16213e 0%, #0f0f1e 100%);
    border: 2px solid #2e2e5e;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #6c5ce7;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
}

.stat-card.head-card {
    border-color: #fdcb6e;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1) 0%, #0f0f1e 100%);
}

.stat-card.head-card:hover {
    box-shadow: 0 5px 20px rgba(253, 203, 110, 0.3);
}

.stat-card.tail-card {
    border-color: #00cec9;
    background: linear-gradient(135deg, rgba(0, 206, 201, 0.1) 0%, #0f0f1e 100%);
}

.stat-card.tail-card:hover {
    box-shadow: 0 5px 20px rgba(0, 206, 201, 0.3);
}

.stat-label {
    font-size: 12px;
    color: #b2b2d8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.stat-card.head-card .stat-value {
    color: #fdcb6e;
}

.stat-card.tail-card .stat-value {
    color: #00cec9;
}

/* Wallet Grid */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.wallet-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #2e2e5e;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-label {
    color: #b2b2d8;
    font-weight: 600;
}

.wallet-value {
    color: #a29bfe;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.control-card {
    background: linear-gradient(135deg, #16213e 0%, #0f0f1e 100%);
    border: 2px solid #2e2e5e;
    border-radius: 12px;
    padding: 25px;
}

.control-card h3 {
    color: #a29bfe;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.control-card p {
    color: #b2b2d8;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Form Elements */
.input-group {
    margin-bottom: 15px;
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-row .input-group {
    flex: 1;
}

.input-group label {
    display: block;
    color: #b2b2d8;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #2e2e5e;
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.input-field::placeholder {
    color: #6c6c9c;
}

/* Buttons */
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #6c5ce7 0%, #5541d7 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

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

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

.danger-btn {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
}

.danger-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 118, 117, 0.5);
}

.refresh-btn {
    background: linear-gradient(135deg, #00b894 0%, #00a885 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 0 auto;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.5);
}

/* User Info Display */
.user-info-display {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #6c5ce7;
    border-radius: 10px;
    padding: 20px;
    display: none;
}

.user-info-display.show {
    display: block;
}

.user-info-display h4 {
    color: #a29bfe;
    margin-bottom: 15px;
    font-size: 16px;
}

.user-info-display .info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(108, 92, 231, 0.3);
}

.user-info-display .info-label {
    color: #b2b2d8;
    font-weight: 600;
}

.user-info-display .info-value {
    color: #fff;
    font-family: 'Courier New', monospace;
}

/* Transaction Log */
.tx-log {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #2e2e5e;
    border-radius: 10px;
    padding: 15px;
}

.tx-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(108, 92, 231, 0.1);
    border-left: 4px solid #6c5ce7;
    border-radius: 5px;
    font-size: 13px;
}

.tx-item.success {
    border-left-color: #00b894;
    background: rgba(0, 184, 148, 0.1);
}

.tx-item.error {
    border-left-color: #ff7675;
    background: rgba(255, 118, 117, 0.1);
}

.tx-item.info {
    border-left-color: #74b9ff;
    background: rgba(116, 185, 255, 0.1);
}

.tx-time {
    color: #6c6c9c;
    font-size: 11px;
    margin-bottom: 5px;
}

.tx-message {
    color: #fff;
    line-height: 1.5;
}

.tx-hash {
    color: #a29bfe;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    margin-top: 5px;
    word-break: break-all;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: linear-gradient(135deg, rgba(30, 30, 63, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    border: 2px solid #6c5ce7;
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: #00b894;
}

.toast.error {
    border-color: #ff7675;
}

.toast.warning {
    border-color: #fdcb6e;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
}

.toast.success .toast-title {
    color: #00b894;
}

.toast.error .toast-title {
    color: #ff7675;
}

.toast.warning .toast-title {
    color: #fdcb6e;
}

.toast-message {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6c5ce7 0%, #5541d7 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 15px;
    }

    .admin-header h1 {
        font-size: 22px;
    }

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

    .wallet-info {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

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

    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 20px 15px;
    }

    .stats-section,
    .control-section {
        padding: 20px 15px;
    }

    .section-title {
        font-size: 18px;
    }

    .stat-value {
        font-size: 18px;
    }

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

    .wallet-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(108, 92, 231, 0.3);
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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