:root {
    --purple600: #7e56d8;
    --purple700: #6840c6;
    --purple800: #5a36b1;
    --purple300: #d6bbfb;
    --purple400: #b695f8;
    --grey900: #111415;
    --danger: #ef4444;
    --danger-light: #fee2e2;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background decorations pada root halaman */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bg-decoration {
    position: absolute;
    opacity: 0.15;
    z-index: 0;
}

.bg-decoration.circle1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8) 0%, rgba(139, 92, 246, 0) 70%);
    animation: float 15s ease-in-out infinite;
}

.bg-decoration.circle2 {
    bottom: 10%;
    right: 5%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8) 0%, rgba(139, 92, 246, 0) 70%);
    animation: float 12s ease-in-out infinite reverse;
}

.bg-decoration.rect1 {
    top: 25%;
    right: 15%;
    width: 200px;
    height: 200px;
    border-radius: 30px;
    background: rgba(139, 92, 246, 0.3);
    transform: rotate(15deg);
    animation: rotate 20s linear infinite;
}

.bg-decoration.rect2 {
    bottom: 25%;
    left: 15%;
    width: 180px;
    height: 180px;
    background: rgba(139, 92, 246, 0.2);
    transform: rotate(45deg);
    animation: rotate 25s linear infinite reverse;
}

.bg-decoration.hex1 {
    top: 60%;
    left: 30%;
    width: 120px;
    height: 120px;
    background: rgba(139, 92, 246, 0.25);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: float 18s ease-in-out infinite 2s;
}

.bg-decoration.hex2 {
    top: 20%;
    right: 30%;
    width: 150px;
    height: 150px;
    background: rgba(139, 92, 246, 0.15);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: float 14s ease-in-out infinite 1s;
}

/* Moving shapes */
.moving-shape {
    position: absolute;
    opacity: 0.2;
    z-index: 0;
}

.moving-shape.shape1 {
    top: 15%;
    left: 10%;
    width: 60px;
    height: 60px;
    background: var(--purple600);
    border-radius: 12px;
    animation: moveAround 20s linear infinite;
}

.moving-shape.shape2 {
    bottom: 20%;
    right: 15%;
    width: 40px;
    height: 40px;
    background: var(--purple400);
    border-radius: 50%;
    animation: moveAround 25s linear infinite reverse;
}

.moving-shape.shape3 {
    top: 40%;
    right: 30%;
    width: 50px;
    height: 50px;
    background: var(--purple300);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: moveAroundAlt 30s linear infinite;
}

.moving-shape.shape4 {
    bottom: 35%;
    left: 20%;
    width: 70px;
    height: 70px;
    background: var(--purple700);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: moveAroundAlt 35s linear infinite reverse;
}

@keyframes moveAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(100px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(50px, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes moveAroundAlt {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-80px, 80px) rotate(120deg);
    }
    66% {
        transform: translate(80px, 80px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Floating decoration elements */
.floating-shape {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 15%;
    left: 20%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    z-index: 0;
}

.floating-shape-reverse {
    position: absolute;
    width: 300px;
    height: 300px;
    bottom: 10%;
    right: 10%;
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    z-index: 0;
}

.decoration-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 40%;
    right: 30%;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    z-index: 0;
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
}

.grid-lines {
    background-image: linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
                     linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.bg-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-particle {
    position: absolute;
    opacity: 0.3;
    animation: bgFloat 20s linear infinite;
}

/* Animation styles */
@keyframes float-alt {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(0) translateX(10px);
    }
    75% {
        transform: translateY(10px) translateX(5px);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.25;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-alt {
    animation: float-alt 7s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes bgFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Register container */
.register-container {
    display: flex;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 900px;
    max-width: 95%;
    overflow: hidden;
    height: 600px;
    position: relative;
    z-index: 2;
}

.register-image {
    flex: 1;
    background-color: var(--purple600);
    position: relative;
    overflow: hidden;
}

/* Background SVG mengisi seluruh area */
.register-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    object-fit: cover;
}

/* Overlay ungu di atas SVG */
.register-image .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(90, 54, 177, 0.9), rgba(126, 86, 216, 0.85));
    z-index: 2;
}

/* Pattern grid di atas overlay */
.pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.register-form {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.register-header {
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.register-header img {
    max-width: 180px;
    margin-bottom: 1.5rem;
}

/* Logo glow effect */
.logo-glow {
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.3));
    transition: all 0.5s ease;
}

.register-header:hover .logo-glow {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}

.register-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.register-header p {
    color: #666;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--purple600);
    box-shadow: 0 0 0 3px rgba(126, 86, 216, 0.2);
    outline: none;
}

/* Button daftar styling */
.btn-daftar {
    background: linear-gradient(45deg, #8a70d6, #6b46c1);
    color: white;
    font-weight: bold;
    padding: 14px 28px;
    border-radius: 30px;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4); 
    overflow: hidden;
    z-index: 30;
    cursor: pointer;
    width: 100%;
    border: none;
    margin-top: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.btn-daftar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8a70d6, #6b46c1, #8a70d6);
    z-index: -1;
    border-radius: 32px;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-daftar:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(107, 70, 193, 0.6);
}

.btn-daftar:hover::before {
    opacity: 0.7;
}

.btn-daftar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-daftar:hover::after {
    left: 100%;
}

/* Google button styling */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: white;
    color: #555;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #ddd;
    margin-top: 1rem;
    transition: all 0.3s;
}

.btn-google:hover {
    background-color: #f5f5f5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Login link styling */
.login-link {
    margin-top: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-link a {
    color: var(--purple600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-color: #f8f5ff;
    display: inline-block;
}

.login-link a:hover {
    background-color: #f0eaff;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.15);
    transform: translateY(-2px);
}

/* Snackbar for error messages */
.snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--danger-light);
    color: var(--danger);
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: fixed;
    z-index: 100;
    bottom: 30px;
    right: 30px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--danger);
}

.snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 3.5s;
}

.snackbar-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.snackbar-close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.snackbar-close:hover {
    opacity: 1;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .register-container {
        flex-direction: column;
        height: auto;
    }
    
    .register-image {
        display: none;
    }
    
    .register-form {
        padding: 2rem 1.5rem;
    }
    
    .snackbar {
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: calc(100% - 40px);
        min-width: unset;
    }
    
    @keyframes fadein {
        from {
            bottom: 0;
            opacity: 0;
        }
        to {
            bottom: 20px;
            opacity: 1;
        }
    }
    
    @keyframes fadeout {
        from {
            bottom: 20px;
            opacity: 1;
        }
        to {
            bottom: 0;
            opacity: 0;
        }
    }
}