/* Base Styles and Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

/* Container and Card Layout */
.container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.card-header {
    background-color: #5c6bc0;
    color: white;
    padding: 24px;
    text-align: center;
}

.card-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.card-section {
    padding: 24px;
}

.main-card-header-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
    background: #5c6bc0;
    padding: 2rem 2rem 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
}

.privacy-link {
    color: #fff !important;     /* white */
    font-weight: bold;
    text-decoration: none;
}

.privacy-link:hover, .privacy-link:focus {
    text-decoration: underline dotted; /* optional: underline on hover/focus for accessibility */
}

.brand-note-list {
    margin: 8px 0 0 0;
    padding-left: 24px;
}

.brand-note-list li {
    margin-bottom: 4px;
    font-family: 'Menlo', 'Consolas', 'monospace';
    font-size: 0.98em;
}

.brand-note-list code {
    background: #f2eefd;
    border-radius: 3px;
    padding: 0.1em 0.4em;
    color: #6849b3;
}

.header-text-block {
    flex: 1;
    min-width: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.2);
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.primary-button, .secondary-button, .danger-button, .social-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 16px;
    text-align: center;
}

.primary-button {
    background-color: #5c6bc0;
    color: white;
}

.primary-button:hover {
    background-color: #3f51b5;
}

.secondary-button {
    background-color: #e0e0e0;
    color: #333;
    margin-right: 12px;
}

.secondary-button:hover {
    background-color: #d5d5d5;
}

.danger-button {
    background-color: #f44336;
    color: white;
}

.danger-button:hover {
    background-color: #d32f2f;
}

.danger-button:disabled {
    background-color: #ffcdd2;
    cursor: not-allowed;
}

.button-group .secondary-button, .button-group .danger-button {
    width: 48%;
    margin-top: 0;
}

/* Social Login */
.social-login {
    margin-top: 24px;
    text-align: center;
}

.social-login p {
    margin-bottom: 16px;
    color: #666;
}

.social-button {
    background-color: white;
    color: #5c6bc0;
    border: 2px solid #5c6bc0;
}

.social-button:hover {
    background-color: #f5f5f5;
}

/* Information and Warning Boxes */
.warning-box {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.warning-box h3 {
    margin-bottom: 8px;
    color: #e65100;
    font-size: 16px;
}

.warning-box ul {
    padding-left: 24px;
}

.information-box {
    background-color: #e8f4fd;
    border-left: 4px solid #2196f3;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.information-box h3 {
    margin-bottom: 8px;
    color: #0d47a1;
    font-size: 16px;
}

.information-box ul {
    padding-left: 24px;
}

/* Success Section */
.success-icon {
    font-size: 64px;
    color: #4caf50;
    text-align: center;
    margin-bottom: 24px;
}

.return-button {
    margin-top: 24px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

/* Error Messages */
.error-message {
    color: #f44336;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    transition: color 0.2s;
}

/* Loading Overlay */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #5c6bc0;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.brand-logo-big {
    width: 80px;
    min-width: 64px;
    max-width: 100px;
    height: auto;
    margin-right: 1rem;
}

.brand-note {
    margin-top: .5rem;
    font-size: 0.97rem;
    color: #55578b;
    background: #f6f4fa;
    padding: 0.7em 1.2em;
    border-radius: 7px;
    font-family: 'Inter', Arial, sans-serif;
}

.brand-note code {
    font-size: 0.98em;
    background: #f2eefd;
    border-radius: 3px;
    padding: 0.1em 0.4em;
    color: #6849b3;
}

.trademark {
    color: #9a94bc;
    font-size: 12px;
    margin-top: 10px;
}

.brand-link {
    text-decoration: none;
    color: #46279a;
    font-weight: bold;
}

.card {
    margin-top: 2rem;
}

.learn-more a {
    color: #46279a;
    font-weight: 500;
    text-decoration: underline dotted;
}

@media (max-width: 600px) {
    .main-card-header-flex { flex-direction: column; gap: 1rem; padding: 1.3rem 0.8rem; }
    .brand-logo-big { width: 56px; }
}

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

/* Footer */
.footer {
    text-align: center;
    margin-top: 24px;
    color: #666;
    font-size: 14px;
}

.footer p {
    margin-bottom: 8px;
}

.footer-links {
    margin-top: 16px;
}

.footer-links a {
    color: #5c6bc0;
    margin: 0 8px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px auto;
        padding: 0 10px;
    }

    .card-header {
        padding: 16px;
    }

    .card-section {
        padding: 16px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .secondary-button, .button-group .danger-button {
        width: 100%;
        margin-right: 0;
    }

    .button-group .secondary-button {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card-header h1 {
        font-size: 20px;
    }

    .form-group input {
        padding: 10px;
    }

    .primary-button, .secondary-button, .danger-button, .social-button {
        padding: 10px 18px;
    }
}