@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 40px 20px;
    background-color: #F8FAFC;
    color: #334155;
    line-height: 1.6;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    height: 80vh;
    margin: 0 auto;
    flex-wrap: wrap;
}

.panel {
    flex: 1;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #E0E7FF;
}

.panel:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

#examOutput {
    flex: 1;
    background: rgba(255,255,255,0.7);
    padding: 16px;
    border-radius: 12px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.1);
    height: 60vh;
    overflow-y: auto;
}

textarea, input[type="number"], input[type="text"], input[type="file"] {
    width: 100%;
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea {
    height: 250px; /* Slightly reduced for Bento fit */
    resize: vertical;
}

textarea:focus, input:focus {
    border-color: #A78BFA;
    outline: none;
}

h2 {
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    color: #1E293B;
}

button {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

#copyBtn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    margin-top: 16px;
    width: 100%;
}

#copyBtn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: #64748B;
}

/* Toast Styles */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.toast-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #b92110 0%, #960a05 100%);
    color: white;
}

#toast.show {
    transform: translateX(0);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 1rem;
    color: #94A3B8;
    font-weight: 500;
    font-style: italic;
}

.footer::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        gap: 16px;
    }
    
    .left-top, .left-bottom, .right {
        grid-row: auto;
        grid-column: 1;
        min-height: auto;
    }
    
    .panel {
        padding: 20px;
    }
    
    .left-bottom {
        padding: 16px;
    }
    
    body {
        padding: 20px 10px;
    }
    
    #toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    #toast.show {
        transform: translateY(0);
    }
}