/* ===== Base Layout ===== */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f9fafb;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.container {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 400px;
}

h1 {
    margin-bottom: 0.5rem;
}

p {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ===== Form ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
    text-align: left;
}

input[type="email"],
input[type="file"] {
    padding: 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #1e40af;
}

/* ===== Loading Overlay ===== */
.loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2563eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* ===== Toast Notification ===== */
#toast {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#toast.hidden {
    display: none;
}

.toast-content {
    background-color: #222;
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 80%;
    position: relative;
}

#toast.success .toast-content {
    background-color: #16a34a; /* Green */
}

#toast.error .toast-content {
    background-color: #dc2626; /* Red */
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 0.7;
}

.mode-switch {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.mode-btn {
    background-color: #ffffff;
    color: #333;
    border: 2px solid #d0d0d0;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mode-btn:hover {
    background-color: #f5f5f5;
    border-color: #aaa;
}

.mode-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.mode-indicator {
    margin: 10px 0;
    font-weight: 600;
    color: #2563eb;
    font-size: 0.9rem;
    text-align: center;
}
