:root {
    --primary: #2563eb;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.container { width: 100%; max-width: 700px; }

/* Header */
header { text-align: center; margin-bottom: 25px; }
.logo { font-size: 2rem; font-weight: bold; color: var(--primary); display: flex; justify-content: center; gap: 10px; align-items: center; }
header p { color: #6b7280; margin-top: 5px; }

/* Card Style */
.card { background: var(--card); padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 20px; }

/* Input Group */
.input-group { 
    display: flex; align-items: center; 
    border: 2px solid #e5e7eb; border-radius: 8px; 
    overflow: hidden; background: #fff; margin-top: 8px;
}
input[type="text"] { 
    border: none; outline: none; padding: 12px; flex: 1; 
    font-weight: bold; font-size: 1rem; color: var(--primary);
}
.domain-tag { 
    background: #f3f4f6; padding: 12px 15px; 
    font-weight: 600; color: #6b7280; border-left: 1px solid #e5e7eb;
}

/* Buttons */
.action-buttons { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
button { 
    padding: 10px 15px; border: none; border-radius: 6px; 
    cursor: pointer; font-weight: 600; color: white; transition: 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    flex: 1; min-width: 100px;
}
.btn-primary { background: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-warning { background: #f59e0b; } /* Kuning */
.btn-success { background: #10b981; } /* Hijau */
.btn-secondary { background: #4b5563; flex: 0 0 50px; } /* Abu-abu kecil */

/* Inbox Header & Timer */
.inbox-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; 
}
.inbox-header h2 { font-size: 1.2rem; }
.refresh-wrapper { display: flex; align-items: center; gap: 10px; }
#timerText { font-size: 0.85rem; color: #6b7280; font-family: monospace; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; background: #9ca3af; min-width: auto; }

/* Email List */
.email-item {
    background: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; 
    border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: 0.2s;
}
.email-item:hover { transform: translateY(-2px); border-color: var(--primary); }
.email-top { display: flex; justify-content: space-between; font-size: 0.85rem; color: #64748b; margin-bottom: 5px; }
.email-subject { font-weight: bold; font-size: 1rem; margin-bottom: 5px; color: #334155; }
.email-snippet { font-size: 0.9rem; color: #64748b; }

/* Modal (Popup) */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
.modal-content { 
    background-color: #fff; margin: 5% auto; border-radius: 12px; 
    width: 90%; max-width: 700px; overflow: hidden; animation: slide 0.3s ease;
}
@keyframes slide { from {transform: translateY(-50px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
.close { float: right; font-size: 28px; font-weight: bold; cursor: pointer; padding: 10px 20px; color: #aaa; }
.close:hover { color: #000; }
.modal-title { padding: 20px 25px 5px; }
.modal-meta { padding: 0 25px; color: #6b7280; font-size: 0.9rem; margin-bottom: 15px; }
.modal-body-text { 
    background: #f9fafb; padding: 25px; font-family: monospace; 
    white-space: pre-wrap; word-wrap: break-word; max-height: 60vh; overflow-y: auto; 
    border-top: 1px solid #e5e7eb;
}

/* Loading & Empty State */
.spinner { 
    border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); 
    border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 20px auto; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px; color: #9ca3af; }

/* Mobile Responsive */
@media (max-width: 600px) {
    .input-group { flex-direction: column; align-items: stretch; }
    .domain-tag { border-left: none; border-top: 1px solid #e5e7eb; text-align: center; }
}