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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.balance-section {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.balance-section h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

#balance {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.contract-status-section {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.contract-status-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.status-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-item h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.status-item input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 8px 12px;
    color: #4a5568;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.status-item input::placeholder {
    color: #a0aec0;
}

.status-item input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.button-group {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.button-group h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

button:active {
    transform: translateY(0);
}

.refresh-btn {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3) !important;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a) !important;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4) !important;
}

.owner-btn {
    background: linear-gradient(135deg, #ed8936, #dd6b20) !important;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3) !important;
}

.owner-btn:hover {
    background: linear-gradient(135deg, #dd6b20, #c05621) !important;
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4) !important;
}

.connect-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce) !important;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3) !important;
}

.connect-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282) !important;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4) !important;
}

#output {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-height: 50px;
    color: #4a5568;
    word-break: break-all;
}

.status-message {
    text-align: center;
    font-weight: 600;
    padding: 10px;
}

.loading {
    color: #718096;
}

.success {
    color: #38a169;
}

.error {
    color: #e53e3e;
}

.unlock-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.fee-info {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

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

    .unlock-options {
        grid-template-columns: 1fr;
    }

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

    .status-item {
        margin-bottom: 10px;
    }

    .status-item button {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 5px;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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