/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    color: #1a202c;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Signup container */
.signup-container {
    width: 100%;
    max-width: 480px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    position: relative;
}

.signup-box {
    width: 100%;
    background: white;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    position: relative;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.logo {
    width: 160px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #ecc94b 0%, #f6e05e 100%);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.language-toggle[data-lang="en"]::before {
    transform: translateX(100%);
}

.lang-btn {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-family: inherit;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    color: #744210;
}

.lang-btn.active {
    color: #744210;
    font-weight: 700;
}

/* Typography */
.subtitle {
    color: #2d3748;
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
    position: relative;
    background: #ffffff;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.name-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.name-group .form-group {
    margin-bottom: 0;
    width: 100%;
    padding: 8px;
}

.name-group label {
    display: block;
    margin-bottom: 8px;
    padding-left: 24px;
}

.name-group input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 14px 12px 14px 28px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a202c;
    box-sizing: border-box;
}

.name-group input[type="text"]:focus {
    border-color: #ecc94b;
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(236, 201, 75, 0.1);
}

label {
    display: block;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.025em;
    position: relative;
    padding-left: 24px;
}

label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

label[for="firstName"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

label[for="lastName"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

label[for="email"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

label[for="password"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

label[for="confirmPassword"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a202c;
    height: 50px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #ecc94b;
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(236, 201, 75, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

/* Signup button */
.signup-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ecc94b 0%, #f6e05e 100%);
    color: #744210;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 16px;
}

.signup-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 201, 75, 0.3);
}

.signup-button:active {
    transform: translateY(0);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    animation: slideIn 0.3s ease-out;
}

.alert::before {
    content: '';
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.alert-error {
    border-color: #feb2b2;
}

.alert-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c53030'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.alert-success {
    border-color: #ecc94b;
    position: relative;
}

.alert-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ecc94b'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.alert-success::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ecc94b, #f6e05e);
    border-radius: 0 0 12px 12px;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .signup-container {
        margin: 10px auto;
    }

    .signup-box {
        padding: 20px 16px;
    }

    .logo {
        width: 140px;
    }

    .logo-container {
        margin-bottom: 16px;
    }

    .language-toggle {
        margin-bottom: 20px;
        padding: 3px;
    }

    .lang-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 32px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .form-group {
        padding: 10px;
        margin-bottom: 12px;
    }

    .name-group {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }

    .name-group .form-group {
        width: 100%;
        padding: 8px;
    }

    .name-group input[type="text"] {
        height: 42px;
        padding: 10px 8px 10px 20px;
    }

    .signup-button {
        padding: 12px;
        margin-top: 12px;
    }
}

/* Resend code section */
.resend-form {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.resend-text {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 12px;
}

.resend-button {
    background: none;
    border: none;
    color: #744210;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.resend-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ecc94b, #f6e05e);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.resend-button:hover {
    color: #ecc94b;
}

.resend-button:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.resend-button:disabled {
    color: #a0aec0;
    cursor: not-allowed;
}

.resend-button:disabled::before {
    display: none;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px auto 0 auto;
    width: 36px;
    height: 36px;
}
.loading-spinner:after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 4px solid #ecc94b;
    border-top: 4px solid #f8fafc;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.field-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    padding: 8px 12px;
    line-height: 1.4;
    box-shadow: none;
}
.field-error .icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}
