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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: lightblue;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    line-height: 1.5;
    padding: 24px;
}

.container {
    width: 100%;
    max-width: 480px;
}

header {
    text-align: center;
    margin-bottom: 36px;
    background: lightsalmon;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #BAE6FD;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1E40AF;
    margin-bottom: 10px;
    background: #EFF6FF;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: darkturquoise;
    letter-spacing: 0.02em;
}

/* ===== LOTTERY STATUS INDICATOR ===== */
.lottery-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lottery-status.active {
    background: #D1FAE5;
    color: #065F46;
}

.lottery-status.inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.lottery-status.active .status-dot {
    background: #10B981;
    box-shadow: 0 0 6px #10B981;
    animation: pulse 1.5s infinite;
}

.lottery-status.inactive .status-dot {
    background: #EF4444;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    background: lightcoral;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 18px;
}

/* ===== WALLET CONNECTION SECTION ===== */
.wallet-section {
    background: lightgoldenrodyellow;
    border: 1px solid #BAE6FD;
}

.card h2 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
    margin-bottom: 12px;
}

.card p {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 12px;
}

.card span {
    font-weight: 600;
    color: #111827;

}

/* ===== WALLET CONNECTION SECTION ===== */
.wallet-section span {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    background: #F1F5F9;
    color: #111827;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ===== GAMBLE BADGE ===== */
.gamble-badge {
    display: inline-block;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 22px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* ===== START LOTTERY SECTION ===== */
.start-section {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
}

#startLotteryBtn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
}

#startLotteryBtn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* ===== ENTER LOTTERY SECTION ===== */
.enter-section {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
}

/* ===== CONTRACT BALANCE SECTION ===== */
.balance-section {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
}

.balance-section span {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    background: #D1FAE5;
    color: #065F46;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ===== MANAGER CONTROLS SECTION ===== */
.manager-section {
    background: #FFFBEB;
    border: 1px solid #F59E0B;
}

.manager-section h2 {
    color: #92400E;
}

/* ===== BUTTONS ===== */
button {
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Connect Wallet & Enter Lottery - Primary Blue */
#connectWalletBtn,
#enterLotteryBtn {
    background: #2563EB;
    color: #FFFFFF;
}

#connectWalletBtn:hover {
    background: #1D4ED8;
}

#enterLotteryBtn:hover {
    background: #1E40AF;
}

/* Refresh Balance - Green */
#refreshBalanceBtn {
    background: #16A34A;
    color: #FFFFFF;
}

#refreshBalanceBtn:hover {
    background: #15803D;
}

/* Pick Winner - Red/Stop */
#pickWinnerBtn {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
}

#pickWinnerBtn:hover {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
}

/* ===== STATUS SECTION ===== */
.status-section {
    background: #FFFBEB;
    border: 1px solid #D1D5DB;
}

.status-section #statusMessage {
    font-size: 0.875rem;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    background: transparent;
    color: #374151;
}

.status-section #statusMessage.success {
    color: #065F46;
}

.status-section #statusMessage.warning {
    color: #92400E;
}

.status-section #statusMessage.error {
    color: #991B1B;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 24px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 14px;
    }

    button {
        width: 100%;
        padding: 12px;
    }
}

/* ===== NOTIFICATION OVERLAY ===== */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease;
}

.notification-overlay.hidden {
    display: none;
}

.notification-box {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.notification-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.notification-box p {
    font-size: 1rem;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 20px;
    line-height: 1.5;
    word-break: break-all;
    overflow-wrap: break-word;
}

#notificationCloseBtn {
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    padding: 10px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
}

#notificationCloseBtn:hover {
    background: #1D4ED8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}