:root {
    --primary-color: #00ff9d;
    --primary-dark: #00cc7d;
    --background-dark: #121212;
    --card-background: #1e1e1e;
    --header-background: #2a2a2a;
    --text-light: #ffffff;
    --text-muted: #888888;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 1s ease-in-out;
}

.header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.header .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-container {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-bottom: 30px;
    animation: slideDown 0.5s ease-in-out;
}

.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mode-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 255, 157, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(0, 255, 157, 0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--primary-color);
    color: var(--background-dark);
}

.chain-select {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px 0 0 8px;
    background-color: var(--header-background);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.chain-select:hover {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.chain-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.chain-select option {
    background-color: var(--header-background);
    color: var(--text-light);
    padding: 10px;
}

.warning-text {
    color: var(--danger-color);
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 5px;
    text-align: left;
    position: absolute;
    bottom: -20px;
    left: 0;
}

.input-group {
    display: flex;
    margin-bottom: 20px; /* Increased from 10px to accommodate warning text */
    width: 100%;
    position: relative; /* Added to position the warning text */
}

input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px 0 0 8px;
    background-color: var(--header-background);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

button {
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: var(--background-dark);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

/* Loader styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 50px 0;
    animation: fadeIn 0.5s ease-in-out;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    background: linear-gradient(45deg, transparent, transparent 40%, var(--primary-color));
    animation: rotate 1.5s linear infinite;
}

.loader-inner {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--background-dark);
    position: absolute;
    top: 5px;
    left: 5px;
}

.loading-text {
    margin-top: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border-left: 4px solid var(--danger-color);
    animation: slideIn 0.3s ease-in-out;
}

.chain-info {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
    animation: fadeIn 0.8s ease-in-out;
}

.chain-info h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    background-color: var(--header-background);
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.info-label {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
}

.table-container {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
    animation: slideUp 0.8s ease-in-out;
}

.table-container h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.table-wrapper {
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-background);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--header-background);
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.moniker-cell {
    font-weight: bold;
    color: var(--primary-color);
}

.address-cell {
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timestamp {
    text-align: center;
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 0.9rem;
}

.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Responsive design */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    input {
        border-radius: 8px 8px 0 0;
    }
    
    button {
        border-radius: 0 0 8px 8px;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    table {
        min-width: 1000px;
    }
}

/* New Table Styles */
.rank-cell {
    font-weight: bold;
    color: var(--text-muted);
    text-align: center;
    width: 50px;
}

.moniker-cell {
    min-width: 200px;
}

.moniker-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1em;
}

.moniker-subtitle {
    font-size: 0.85em;
    color: var(--danger-color);
    margin-top: 2px;
}

.status-cell {
    text-align: center;
    min-width: 120px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.status-jailed {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.status-inactive {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.status-unbonding {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.stake-cell {
    text-align: right;
    min-width: 150px;
}

.stake-amount {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-light);
}

.stake-subtitle {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 2px;
}

.commission-cell {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

.uptime-cell {
    min-width: 120px;
}

.uptime-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.uptime-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.uptime-excellent .uptime-bar {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.uptime-high .uptime-bar {
    background: linear-gradient(90deg, #8bc34a, #cddc39);
}

.uptime-medium .uptime-bar {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

.uptime-low .uptime-bar {
    background: linear-gradient(90deg, #ff5722, #f44336);
}

.uptime-text {
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
}

.uptime-excellent .uptime-text {
    color: var(--success-color);
}

.uptime-high .uptime-text {
    color: #8bc34a;
}

.uptime-medium .uptime-text {
    color: var(--warning-color);
}

.uptime-low .uptime-text {
    color: var(--danger-color);
}

.missblock-cell {
    text-align: center;
    font-weight: bold;
    color: var(--text-muted);
}

.actions-cell {
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
}

.btn-copy, .btn-info {
    background: transparent;
    border: none;
    color: var(--primary-color);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.btn-copy:hover {
    background: rgba(0, 255, 157, 0.2);
    color: var(--primary-color);
    transform: scale(1.2);
}

.btn-info:hover {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    transform: scale(1.2);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-background);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.detail-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--header-background);
    border-radius: 8px;
}

.detail-label {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 8px;
}

.detail-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    color: var(--text-light);
    word-break: break-all;
}

.btn-copy-inline {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-copy-inline:hover {
    background: var(--primary-color);
    color: var(--background-dark);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-background);
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    z-index: 2000;
    transition: bottom 0.3s ease;
    font-weight: bold;
}

.toast-notification.show {
    bottom: 30px;
}

/* Status colors */
.status-bonded {
    color: var(--success-color);
    font-weight: bold;
}

.status-unbonded {
    color: var(--danger-color);
    font-weight: bold;
}

.status-unbonding {
    color: var(--warning-color);
    font-weight: bold;
}

.uptime-high {
    color: var(--success-color);
    font-weight: bold;
}

.uptime-medium {
    color: var(--warning-color);
    font-weight: bold;
}

.uptime-low {
    color: var(--danger-color);
    font-weight: bold;
}

.jailed {
    background-color: rgba(244, 67, 54, 0.1);
}

@keyframes blink {
    0% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.4; transform: scale(0.8); }
}

@keyframes glow {
    0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
    50% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
}

.status-emoji {
    display: inline-block;
    font-size: 1.2em;
}

.status-bonded .status-emoji {
    animation: blink 2s infinite, glow 2s infinite;
    color: var(--success-color);
}

.status-unbonded .status-emoji {
    animation: blink 1.5s infinite, glow 1.5s infinite;
    color: var(--danger-color);
}

.status-unbonding .status-emoji {
    animation: blink 2.5s infinite, glow 2.5s infinite;
    color: var(--warning-color);
}

.jail-emoji {
    display: inline-block;
    animation: blink 2s infinite;
}

.tombstone-emoji {
    display: inline-block;
    animation: blink 2.2s infinite;
}