/* registerStyle.css */
:root {
    --primary-color: #ff8000;
    --primary-color-dark: #cc6600;
    --primary-color-light: #ffaa33;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #777777;
    --input-border: #dddddd;
    --input-focus: #ff8000;
}

.theme-green { --primary-color: #63B22F; --primary-color-dark: #4a8c22; --input-focus: #63B22F; }
.theme-dark { --primary-color: #ff8000; --primary-color-dark: #cc6600; --bg-color: #121212; --card-bg: #1e1e1e; --text-color: #e0e0e0; --text-muted: #888888; --input-border: #333333; --input-focus: #ff8000; }
.theme-pink { --primary-color: #FF8EAB; --primary-color-dark: #d66a87; --input-focus: #FF8EAB; }
.theme-neon { --primary-color: #D9FF3D; --primary-color-dark: #b1cc2a; --bg-color: #0a0a0a; --card-bg: #1a1a1a; --text-color: #ffffff; --text-muted: #aaaaaa; --input-border: #333333; --input-focus: #D9FF3D; }
.theme-blue { --primary-color: #4A90E2; --primary-color-dark: #357abd; --input-focus: #4A90E2; }

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

html, body {
    min-height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.5s ease;
}

body.with-nav {
    padding-top: 80px; /* Space for fixed nav */
}

/* Background decoration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../media/img/bubbles.png');
    background-size: cover;
    opacity: 0.2;
    z-index: -1;
}

.register-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 95%;
    max-width: 550px;
    margin: 2rem auto 4rem;
    transition: background 0.5s ease, transform 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    width: 120px;
    height: auto;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.logo-circle img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.register-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-color);
}

.register-header p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Avatar Section */
.avatar-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.avatar-preview-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    border: 3px solid var(--primary-color);
    padding: 3px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.avatar-preview-container:hover {
    transform: scale(1.05);
}

.avatar-preview-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.upload-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.8rem;
    border: 2px solid var(--card-bg);
}

.avatar-upload-section label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.85rem;
}

label i {
    margin-right: 5px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(255, 128, 0, 0.1);
}

.theme-neon input:focus, .theme-neon textarea:focus { box-shadow: 0 0 0 3px rgba(217, 255, 61, 0.1); }
.theme-green input:focus, .theme-green textarea:focus { box-shadow: 0 0 0 3px rgba(99, 178, 47, 0.1); }
.theme-blue input:focus, .theme-blue textarea:focus { box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1); }
.theme-pink input:focus, .theme-pink textarea:focus { box-shadow: 0 0 0 3px rgba(255, 142, 171, 0.1); }

.form-divider {
    grid-column: span 2;
    display: flex;
    align-items: center;
    margin: 1rem 0 1.5rem;
}

.form-divider::before, .form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--input-border);
}

.form-divider span {
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

textarea {
    resize: none;
}

/* Button */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.submit-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* Message Area */
.message-area {
    margin-top: 1.5rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    display: none;
}

.message-area.visible {
    display: block;
}

.message-area.success { background-color: rgba(40, 167, 69, 0.15); color: #28a745; border: 1px solid #28a745; }
.message-area.error { background-color: rgba(220, 53, 69, 0.15); color: #dc3545; border: 1px solid #dc3545; }
.message-area.info { background-color: rgba(0, 123, 255, 0.15); color: #007bff; border: 1px solid #007bff; }

/* Custom Scrollbar for the container */
.register-container::-webkit-scrollbar { width: 6px; }
.register-container::-webkit-scrollbar-track { background: transparent; }
.register-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }
.theme-dark .register-container::-webkit-scrollbar-thumb,
.theme-neon .register-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Responsive adjustments */
@media (max-width: 400px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-divider, .form-group.full-width { grid-column: span 1; }
    .register-container { padding: 1.5rem; }
}
