/* --- Global Styles & Variables (Inspired by dashboard.html) --- */
:root {
    --bg-color: #0d0f1a;
    --card-bg-color: #1a1c2a; /* Adjusted slightly darker based on image */
    --border-color: rgba(138, 43, 226, 0.3); /* Slightly more visible border */
    --input-bg-color: #141621; /* Keep dark input background */
    --glow-color: rgba(138, 43, 226, 0.8);
    --accent-color1: #8A2BE2;
    --accent-color2: #00D1C5;
    --text-color: #e0e0e0;
    --text-muted: #888da8;
    --negative-color: #ff4d4d;
     /* RGB version for RGBA backgrounds, if needed */
    --negative-rgb: 255, 77, 77;
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --border-radius: 8px;
    --card-padding: 30px 35px; /* Adjusted padding for better spacing */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll on small screens if form wider */
}

h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    margin-bottom: 1em;
    color: #fff;
    letter-spacing: 1px;
    text-align: center;
    font-size: 2rem;
}

p {
    margin-bottom: 1em;
    color: var(--text-muted);
    font-size: 0.9rem;
}

a {
    color: var(--accent-color2);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

a:hover {
    color: var(--accent-color1);
    text-decoration: underline;
}

/* --- Registration Form Specific Styles --- */
.register-container {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: form-fade-in 0.6s ease-out forwards;
    border: 1px solid transparent; /* Reserve space for pseudo-element border */
}

/* Glowing border using pseudo-element */
.register-container::before {
    content: '';
    position: absolute;
    top: -1px; bottom: -1px; left: -1px; right: -1px;
    background: linear-gradient(135deg, var(--accent-color1), var(--accent-color2));
    z-index: -1;
    border-radius: var(--border-radius);
}
 /* Inner background overlay */
.register-container::after {
     content: '';
     position: absolute;
     top: 1px; bottom: 1px; left: 1px; right: 1px;
     background: var(--card-bg-color);
     border-radius: calc(var(--border-radius) - 1px);
     z-index: -1;
}

@keyframes form-fade-in {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Corner Icons */
.corner-icons {
    position: absolute;
    top: 15px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2; /* Above border effect */
}
.corner-icon {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-family: monospace;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* Centered Logo */
.form-logo {
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.8;
    z-index: 2;
    position: relative;
}
.form-logo svg {
     width: 45px;
     height: 45px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 2; /* Ensure form elements are above border */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
}

.form-group input::placeholder {
     color: var(--text-muted);
     opacity: 0.6;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color1);
    box-shadow: 0 0 8px var(--glow-color);
}

/* --- Animated Button (Adapted from dashboard / login) --- */
.animated-button {
    background: linear-gradient(90deg, var(--accent-color1), var(--accent-color2));
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 500;
    font-family: var(--font-secondary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    z-index: 1; /* Can be 1, elements inside should have higher z-index */
    text-align: center;
    display: block;
    width: 100%;
    font-size: 1rem;
    margin-top: 15px;
    text-decoration: none;
}
.animated-button span {
    position: relative;
    z-index: 2; /* Above pseudo-element */
}
.animated-button::before { /* Shiny hover effect */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transition: left var(--transition-medium);
    z-index: 1; /* Below text span */
}
.animated-button:hover {
     filter: brightness(1.1);
     text-decoration: none;
}
.animated-button:hover::before {
    left: 100%;
}
.animated-button:active {
    transform: scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: brightness(0.95);
}

/* --- Error Message Styling --- */
.error-message {
    background-color: rgba(var(--negative-rgb, 255, 77, 77), 0.15); /* Fallback added */
    color: var(--negative-color);
    border: 1px solid var(--negative-color);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    position: relative;
}
.error-message::before {
    content: '⚠️';
    font-size: 1.1rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Alert/Message Styling (for Django messages) */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    border: 1px solid transparent;
    text-align: center;
}
.alert-error {
    color: var(--negative-color);
    background-color: rgba(var(--negative-rgb, 255, 77, 77), 0.1);
    border-color: rgba(var(--negative-rgb, 255, 77, 77), 0.3);
}
.alert-success {
    color: var(--positive-color);
    background-color: rgba(var(--positive-rgb, 0, 255, 170), 0.1);
    border-color: rgba(var(--positive-rgb, 0, 255, 170), 0.3);
}
.alert-info {
    color: var(--neutral-color);
    background-color: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

/* --- Links below form --- */
.form-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    z-index: 2;
    position: relative;
}

/* --- Responsive Adjustments --- */
 @media (max-width: 480px) {
     html { font-size: 15px; }
     body { padding: 10px; }
     .register-container { padding: 25px 20px; max-width: 100%; } /* Allow full width on small screens */
     h1 { font-size: 1.8rem; }
     .animated-button { padding: 11px 15px; }
     .corner-icons { top: 10px; left: 10px; }
     .form-logo svg { width: 40px; height: 40px; }
 }
