/* Register page styling */

:root {
    /* Green color palette */
    --primary-green: #22c55e;        /* Main green */
    --green-medium: #16a34a;         /* Medium green */
    --green-dark: #15803d;           /* Dark green */
    --green-light: #4ade80;          /* Light green */
    --green-lighter: #86efac;        /* Lighter green */
    --green-lightest: #bbf7d0;       /* Lightest green */
    
    /* Background colors */
    --bg-primary: #f0fdf4;           /* Page background */
    --bg-secondary: #ffffff;         /* White background */
    --bg-card: #ffffff;              /* Form background */
    --bg-input: #f8fafc;             /* Input background */
    
    /* Text colors */
    --text-primary: #1f2937;         /* Main text */
    --text-secondary: #4b5563;       /* Secondary text */
    --text-light: #6b7280;           /* Light text */
    --text-white: #ffffff;           /* White text */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--green-medium) 100%);
    --gradient-light: linear-gradient(135deg, var(--green-light) 0%, var(--primary-green) 100%);
    
    /* Borders & shadows */
    --border-light: #d1fae5;         /* Light border */
    --border-medium: #a7f3d0;        /* Medium border */
    --border-primary: var(--primary-green);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(22, 163, 74, 0.1);
    --shadow-lg: 0 10px 25px rgba(22, 163, 74, 0.15);
    --shadow-xl: 0 20px 40px rgba(22, 163, 74, 0.2);
    --shadow-primary: 0 8px 25px rgba(34, 197, 94, 0.3);
}

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

/* Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: 
        radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(134, 239, 172, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background effects */
body::before {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--green-lighter) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    opacity: 0.4;
    animation: float 25s infinite linear;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green-light) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    opacity: 0.3;
    animation: float 20s infinite linear reverse;
    z-index: -1;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }
    100% {
        transform: rotate(360deg) translate(60px, 60px);
    }
}

/* Register form container */
.register-box {
    width: min(480px, 92vw);
    padding: 60px 50px;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.6s ease-out;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Form background pattern */
.register-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.05) 2px, transparent 3px),
        radial-gradient(circle at 90% 90%, rgba(22, 163, 74, 0.05) 2px, transparent 3px);
    background-size: 100px 100px;
    border-radius: 24px;
    z-index: -1;
}

/* Form entrance animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Form title */
.register-box::after {
    content: 'CREATE ACCOUNT';
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    opacity: 0.9;
    text-align: center;
    width: 100%;
}

/* Main heading */
.register-heading {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--green-medium), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* Form layout */
.register-box form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 24px;
    margin-bottom: 30px;
}

/* Input fields */
.form-control {
    width: 100%;
    height: 54px;
    padding: 0 50px 0 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: var(--shadow-sm);
    margin: 0 !important;
}

/* Input spacing */
.form-control.mb-3 {
    margin-bottom: 24px !important;
}

/* Input icons */
.form-control[placeholder="username"],
.form-control[name="username"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-control[placeholder="email"],
.form-control[name="email"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'%3E%3C/rect%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-control[placeholder="firstname"],
.form-control[name="firstname"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-control[placeholder="lastname"],
.form-control[name="lastname"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-control[placeholder="password"],
.form-control[name="password"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

/* Input states */
.form-control:hover {
    border-color: var(--border-medium);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

.form-control:focus {
    border-color: var(--primary-green);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 400;
    opacity: 0.8;
}

/* Button container */
.btn-box {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Register button */
.btn {
    width: 100%;
    max-width: 220px;
    height: 54px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
    text-transform: none;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

/* Button hover state */
.btn:hover {
    background: var(--gradient-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/* Login link */
.login-link {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-light);
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.login-link a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.login-link a:hover {
    text-decoration: underline;
    color: var(--green-medium);
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .register-box {
        padding: 50px 40px;
        border-radius: 20px;
        margin-top: 20px;
        width: min(440px, 92vw);
    }
    
    .register-heading {
        font-size: 28px;
        margin-bottom: 35px;
    }
    
    .register-box form {
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .form-control {
        height: 52px;
        font-size: 14px;
        padding: 0 45px 0 18px;
    }
    
    .form-control.mb-3 {
        margin-bottom: 20px !important;
    }
    
    .btn {
        height: 52px;
        font-size: 14px;
        max-width: 200px;
    }
    
    .login-link {
        font-size: 13px;
        margin-top: 20px;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .register-box {
        padding: 40px 30px;
        border-radius: 16px;
        margin-top: 10px;
        width: 100%;
        max-width: 400px;
    }
    
    .register-heading {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .register-box::after {
        font-size: 10px;
        letter-spacing: 2px;
    }
    
    .register-box form {
        gap: 18px;
        margin-bottom: 20px;
    }
    
    .form-control {
        height: 50px;
        font-size: 13px;
        padding: 0 40px 0 16px;
    }
    
    .form-control.mb-3 {
        margin-bottom: 18px !important;
    }
    
    .btn {
        height: 50px;
        font-size: 13px;
        max-width: 180px;
    }
    
    .login-link {
        font-size: 12px;
        margin-top: 15px;
        padding-top: 12px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .register-box {
        padding: 30px 20px;
    }
    
    .register-heading {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .register-box form {
        gap: 16px;
        margin-bottom: 15px;
    }
    
    .form-control {
        height: 48px;
        font-size: 12px;
        padding: 0 35px 0 14px;
    }
    
    .form-control.mb-3 {
        margin-bottom: 16px !important;
    }
    
    .btn {
        height: 48px;
        font-size: 12px;
        max-width: 160px;
    }
    
    .login-link {
        font-size: 11px;
        margin-top: 12px;
        padding-top: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .btn::after {
        animation: none;
    }
    
    .form-control:focus,
    .btn:hover {
        transform: none;
    }
    
    .register-box {
        animation: none;
    }
}