@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.background {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #F5F5DC;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waves-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: url('/static/images/waves.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.form-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px 0;
}

.form-island {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    width: 500px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin: auto;
}

.form-island:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.form-title {
    color: #2d2d2d;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    text-align: left;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    position: relative;
}

.password-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #2d2d2d;
    font-size: 16px;
    padding: 12px 40px 12px 0;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(45, 45, 45, 0.6);
}

.form-input:focus::placeholder {
    opacity: 0.5;
}

.input-underline {
    height: 1px;
    background: rgba(45, 45, 45, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.input-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2d2d2d;
    transition: width 0.3s ease;
}

.form-input:focus + .input-underline::after {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 12px;
    background: none;
    border: none;
    color: rgba(45, 45, 45, 0.7);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #2d2d2d;
}

.password-toggle svg {
    width: 16px;
    height: 16px;
}

.password-error {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.register-button {
    background: #2d2d2d;
    color: white;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.register-button:hover:not(:disabled) {
    background: transparent;
    color: #2d2d2d;
    border: 2px solid #2d2d2d;
}

.register-button:disabled {
    background: rgba(45, 45, 45, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

.register-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -10px;
    gap: 5px;
}

.login-text {
    color: rgba(45, 45, 45, 0.8);
    font-size: 14px;
}

.login-link {
    color: #2d2d2d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: rgba(45, 45, 45, 0.7);
    text-decoration: underline;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

/* Responsive design */
@media (max-width: 480px) {
    .form-island {
        padding: 30px 25px;
        width: 95vw;
    }
    
    .form-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    
    .registration-form {
        gap: 20px;
    }
}

/* Animation for form appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-island {
    animation: fadeInUp 0.8s ease-out;
}

/* Дополнительные стили для мобильных устройств */
@media (max-height: 700px) {
    body {
        overflow-y: auto;
    }
    
    .background {
        min-height: 100vh;
        height: auto;
    }
    
    .form-container {
        padding: 40px 0;
    }
}
