/* style.css */

* { 
    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; 
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 5px solid #45CB16;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

.content { 
    padding: 40px; 
}

.form-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.section-title {
    background: linear-gradient(135deg, #45CB16, #2ecc71);
    color: white;
    padding: 20px;
    margin: -30px -30px 25px -30px;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.form-group { 
    margin-bottom: 25px; 
}

label { 
    display: block; 
    margin-bottom: 12px; 
    font-weight: 600; 
    color: #2c3e50;
    font-size: 1.1rem;
}

input, select, textarea, button {
    width: 100%;
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    border-color: #45CB16;
    box-shadow: 0 0 0 3px rgba(69, 203, 22, 0.1);
    outline: none;
    transform: translateY(-2px);
}

textarea { 
    height: 150px; 
    resize: vertical; 
    font-family: 'Courier New', monospace;
}

.btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.alert {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

@media (max-width: 1200px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    
    .content { padding: 25px; }
    
    .header h1 { font-size: 2.2rem; }
    
    .header p { font-size: 1.1rem; }
    
    input, select, textarea, button {
        padding: 16px;
        font-size: 1rem;
    }
}

.smtp-status {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.smtp-status h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.real-time-info {
    background: linear-gradient(135deg, #e7f3ff, #b3d9ff);
    border: 2px solid #3498db;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    text-align: center;
}

.time-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 15px 0;
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    min-width: 300px;
}

.paste-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 35px;
    color: white;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-paste {
    background: linear-gradient(135deg, #28a745, #20c997);
    flex: 1;
    min-width: 200px;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-clear {
    background: linear-gradient(135deg, #dc3545, #c82333);
    flex: 1;
    min-width: 200px;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-sample {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    flex: 1;
    min-width: 200px;
    padding: 15px;
    font-size: 1.1rem;
}

.email-target-group {
    display: flex;
    gap: 15px;
    align-items: end;
}

.email-target-group .form-group {
    flex: 1;
    margin-bottom: 0;
}

.copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 18px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.auto-fill-notice {
    background: #e8f5e8;
    border: 1px solid #45CB16;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #2e7d32;
}

.results-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #e9ecef;
}

.email-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.email-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}

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

.email-icon {
    margin-right: 15px;
    color: #28a745;
    font-size: 1.3rem;
}

.email-icon.error {
    color: #dc3545;
}

.preview-section {
    background: #2c3e50;
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
}

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

.preview-section pre {
    white-space: pre-wrap;
    font-size: 1rem;
    line-height: 1.5;
    font-family: 'Courier New', monospace;
}

.form-note {
    font-size: 0.95rem;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

.hidden-email-info {
    background: #e7f3ff;
    border: 2px dashed #3498db;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
}

/* STYLES BARU UNTUK POP UP BULAT */
.floating-send-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    padding: 10px;
}

.floating-send-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.6);
}

.floating-send-button:active {
    transform: scale(1.05) translateY(-2px);
}

.floating-send-button .icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.floating-send-button.disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.floating-send-button.disabled:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Modal Konfirmasi */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: #28a745;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.modal-message {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #6c757d;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.modal-btn.cancel {
    background: #6c757d;
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading Animation */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Success Auto-clear Notice */
.auto-clear-notice {
    background: #e8f5e8;
    border: 2px solid #45CB16;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    color: #2e7d32;
    font-weight: 500;
}

/* Field yang persistent (tidak pernah dikosongkan) */
.persistent-field {
    background: #f0f8ff !important;
    border-left: 4px solid #3498db !important;
}

.format-example {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
}