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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* Left Panel */
.left-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

input, select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: rgba(100, 200, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

select option {
    background: #1e3c72;
    color: #ffffff;
}

/* Button Group */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Transaction Log */
.transaction-log {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-log h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.log-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.log-empty {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-style: italic;
}

.log-entry {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

/* Right Panel */
.right-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Status Section */
.status-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 15px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.idle .status-dot {
    background: #888;
}

.status-indicator.processing .status-dot {
    background: #f59e0b;
}

.status-indicator.success .status-dot {
    background: #10b981;
}

.status-indicator.error .status-dot {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#statusText {
    font-weight: 600;
    font-size: 16px;
}

.status-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

/* Receipt Section */
.receipt-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.receipt-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #ffffff;
}

.receipt-content {
    margin-bottom: 20px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.receipt-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.receipt-value.small {
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.receipt-value.success {
    color: #10b981;
}

.btn-copy {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

/* Footer Note */
.footer-note {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    margin-top: auto;
}

.footer-note p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-note p:first-child {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Scrollbar Styles */
.log-content::-webkit-scrollbar {
    width: 6px;
}

.log-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.log-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .left-panel, .right-panel {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Progress Modals (Validation & Conversion) */
.validation-modal,
.conversion-modal {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border: 2px solid #00ff00 !important;
    max-width: 600px !important;
    padding: 40px !important;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.3) !important;
}

.validation-modal h2,
.conversion-modal h2 {
    color: #00ff00;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.progress-container {
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff00;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff00 0%, #00cc00 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-message {
    color: #00ffff;
    font-size: 16px;
    margin-top: 20px;
    min-height: 24px;
}

/* Gas Fee Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d1b3d 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    border: 2px solid #dc2626;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
    animation: slideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Gas Info Cards */
.gas-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.gas-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.gas-card-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.gas-card-amount {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.gas-card-time {
    font-size: 48px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 5px;
}

.gas-card-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Alert Box */
.alert-box {
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.4) 0%, rgba(127, 29, 29, 0.4) 100%);
    border: 2px solid #dc2626;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.alert-icon {
    font-size: 24px;
    color: #fbbf24;
}

.alert-title {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 1px;
}

.alert-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.alert-text span {
    font-weight: 700;
    color: #fbbf24;
}

.alert-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.paused-text {
    color: #ef4444;
    font-weight: 700;
}

/* Warning Box */
.warning-box {
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 20px;
}

.warning-title {
    font-size: 13px;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-list li:last-child {
    margin-bottom: 0;
}

.warning-icon {
    color: #fbbf24;
    font-size: 16px;
}

/* Network Stats */
.network-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* Balance Section */
.balance-section {
    margin-bottom: 25px;
}

.balance-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.balance-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    width: 14%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.balance-text {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.balance-text span {
    color: #ef4444;
    font-weight: 700;
}

/* Modal Buttons */
.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-add-gas, .btn-view-details {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-gas {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-add-gas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-view-details {
    background: rgba(59, 130, 246, 0.2);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.btn-view-details:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

.btn-icon {
    font-size: 18px;
}

/* Modal Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.5);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.7);
}

/* Payment Awaiting Modal */
.payment-awaiting-modal {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d1b3d 100%) !important;
    border: 3px solid #fbbf24 !important;
    max-width: 600px !important;
    padding: 50px !important;
    text-align: center;
    box-shadow: 0 0 50px rgba(251, 191, 36, 0.4) !important;
}

.payment-status-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.payment-info-box {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #fbbf24;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
}

.payment-message {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.payment-wallet-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.payment-wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #10b981;
    word-break: break-all;
    margin-bottom: 20px;
}

.payment-amount {
    font-size: 22px;
    font-weight: 700;
    color: #ef4444;
    margin-top: 15px;
}

.payment-instructions {
    margin: 25px 0;
    padding: 20px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 10px;
    border-left: 4px solid #fbbf24;
}

.payment-instructions p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.6;
}

.btn-copy-wallet {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-copy-wallet:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .gas-info-cards {
        grid-template-columns: 1fr;
    }
    
    .network-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-buttons {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .gas-card-amount {
        font-size: 32px;
    }
    
    .gas-card-time {
        font-size: 36px;
    }
}
