/* ======================================== */
/*          Base & Shared Styles            */
/* ======================================== */

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

/* Set a base font size and smooth scrolling */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated gradient background */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.3), transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(251, 146, 60, 0.2), transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -1; /* Ensure it's behind all content */
}

@keyframes gradientShift {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

/* Shared button styles */
button {
    margin-top: 20px;
    width: 100%;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Add a spinner for the loading state */
button .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* When loading, show spinner and hide text */
button.loading .spinner {
    display: block;
}

button.loading span,
button.loading svg:not(.spinner) {
    display: none;
}

/* Style for enabled button on hover */
button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Style for disabled button */
button:disabled {
    background: #5a677d; /* Muted, grayish-blue background */
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
}

button:not(:disabled):active {
    transform: translateY(0);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Shared link container styles */
.link-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.link-container p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.link-container a {
    color: #22d3ee;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-container a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}

/* Shared error message styles */
.error {
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}