/* iOS Font (Bold Weights) & Dark Theme for HTFX Trading Signup */

/* Screen reader only labels for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --primary-color: #007AFF; /* iOS Blue */
    --secondary-color: #34C759; /* iOS Green */
    --accent-color: #FF9500; /* iOS Orange for accents */
    --background-color: #000000; /* Pure Black Background */
    --text-color: #FFFFFF; /* White Text */
    --header-bg: #1c1c1e; /* Slightly lighter dark for header */
    --card-bg: #2c2c2e; /* Darker card background */
    --card-shadow: 0 6px 16px rgba(0,0,0,0.4); /* Deeper Shadow */
    --border-radius: 12px; /* Standard iOS radius */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --element-shadow: 0 4px 10px rgba(0, 122, 255, 0.3); /* Blue element shadow */
    --input-bg: #1c1c1e; /* Input background */
    --input-border: #333333; /* Input border */
    --error-color: #FF3B30; /* iOS Red for errors */
    --success-color: #34C759; /* iOS Green for success */
}

/* Invite Code Hint Styles */
.invite-code-hint {
    margin-top: 8px;
    text-align: center;
}

.invite-code-hint small {
    color: var(--accent-color);
    font-size: 12px;
    opacity: 0.8;
}

.invite-code-hint strong {
    color: var(--secondary-color);
    font-weight: bold;
}

/* HTFX Logo Styles */
.htfx-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 4px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 700; /* Default to Bold for the entire body */
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 100vh;
}

/* Applying bold weight explicitly to elements that might default to lighter */
h1, h2, h3, h4, .btn, .benefit-item h4 {
    font-weight: 700; /* Ensures headings and key text are bold */
}

.signup-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    padding: 18px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 122, 255, 0.1); /* Subtle blue line */
}

/* Bottom Header */
.bottom-header {
    margin-top: 50px;
    margin-bottom: 20px;
    position: static;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    animation: glow 2s infinite alternate; /* Glow effect for logo */
}

.logo i {
    font-size: 32px;
    margin-right: 12px;
}

.logo h1 {
    font-size: 26px;
    letter-spacing: 0.5px;
    font-weight: 800; /* Heavier weight for logo title */
}

nav a {
    color: #cccccc; /* Lighter gray for nav links */
    text-decoration: none;
    margin-left: 30px;
    font-weight: 700; /* Bold for navigation links */
    font-size: 17px;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.login-link {
    background-color: var(--primary-color);
    color: var(--background-color) !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.login-link:hover {
    background-color: #005ecb;
    transform: translateY(-2px);
    box-shadow: var(--element-shadow);
}

/* Main Content */
.signup-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.signup-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    max-width: 800px;
    width: 100%;
    align-items: start;
}

/* Stack form and benefits vertically */
.signup-form-container {
    order: 1;
    max-width: 100%;
    margin: 0;
}

.signup-benefits {
    order: 2;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Container */
.signup-form-container {
    background-color: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    animation: slideInFromTop 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(-30px);
}

.signup-form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.1) 0%, rgba(0, 122, 255, 0) 70%);
    transform: rotate(-45deg);
    z-index: -1;
    animation: rotateGradient 20s linear infinite;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    top: -10px;
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.back-link i {
    font-size: 0.8rem;
}

.form-header h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 122, 255, 0.3);
    font-weight: 800;
}

.form-header p {
    font-size: 18px;
    color: #aaaaaa;
    font-weight: 400;
}

.highlight-number {
    color: #34C759;
    font-weight: 700;
    background: linear-gradient(45deg, #34C759, #30D158);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(52, 199, 89, 0.5);
    animation: glowPulse 2s ease-in-out infinite alternate;
    position: relative;
}

.highlight-number::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #34C759, #30D158);
    border-radius: 8px;
    opacity: 0.3;
    z-index: -1;
    animation: glowExpand 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 25px rgba(52, 199, 89, 0.8);
        transform: scale(1.05);
    }
}

@keyframes glowExpand {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

/* Form Styles */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--primary-color);
    font-size: 18px;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-container input {
    width: 100%;
    padding: 18px 50px;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.input-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

.input-container input:focus + .input-line {
    transform: scaleX(1);
}

.input-container input:focus ~ .input-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.input-container input::placeholder {
    color: #888888;
    font-weight: 400;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.password-toggle {
    position: absolute;
    right: 15px;
    color: #888888;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
}


/* Checkbox Styles */
.checkbox-group {
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--input-border);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}


/* Invite code validation states */
.input-container.invite-code-valid input {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.3);
}

.input-container.invite-code-invalid input {
    border-color: var(--error-color);
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

.invite-code-benefits {
    margin-top: 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(0, 122, 255, 0.1));
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.invite-code-benefits h5 {
    color: var(--secondary-color);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 700;
}

.invite-code-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.invite-code-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #cccccc;
    font-weight: 400;
}

.invite-code-benefits li i {
    color: var(--secondary-color);
    font-size: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: var(--element-shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #005ecb);
    color: var(--background-color);
    animation: pulse 2.5s infinite ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.5);
    animation: none;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-text {
    margin-right: 10px;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

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

.btn-primary:hover::before {
    left: 100%;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

.form-footer p {
    color: #aaaaaa;
    font-weight: 400;
}

.form-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: var(--secondary-color);
}


/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid #333333;
}

footer p {
    font-size: 15px;
    color: #888888;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Animations */
@keyframes glow {
    from { text-shadow: 0 0 5px rgba(0, 122, 255, 0.5); }
    to { text-shadow: 0 0 15px rgba(0, 122, 255, 0.8); }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromBottom {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInFromTop {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes rotateGradient {
    from { transform: rotate(-45deg); }
    to { transform: rotate(315deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success/Error States */
.input-container.success input {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.3);
}

.input-container.error input {
    border-color: var(--error-color);
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
    font-weight: 400;
    animation: shake 0.5s ease-in-out;
}

.success-message {
    color: var(--success-color);
    font-size: 14px;
    margin-top: 5px;
    font-weight: 400;
    animation: fadeIn 0.3s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .signup-content {
        gap: 60px;
    }
    
    .signup-form-container {
        padding: 40px;
    }
    
    .benefit-item {
        padding: 20px;
    }
}

@media (max-width: 992px) {
    .signup-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    nav {
        margin-top: 15px;
    }
    
    nav a {
        margin: 0 15px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .signup-form-container {
        padding: 30px;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
    
    .input-container input {
        padding: 15px 45px;
        font-size: 15px;
    }
    
    .btn {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .benefit-icon {
        margin-top: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .signup-container {
        padding: 0;
    }
    
    .logo {
        flex-direction: column;
    }
    
    .logo i {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    nav a {
        margin: 0;
    }
    
    .signup-form-container {
        padding: 25px;
        margin: 0;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-header p {
        font-size: 16px;
    }
    
    .input-container input {
        padding: 12px 40px;
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .benefits-list {
        gap: 20px;
    }
    
    .benefit-item {
        padding: 15px;
    }
    
    .benefit-icon {
        font-size: 28px;
    }
    
    .benefit-content h4 {
        font-size: 18px;
    }
    
    .benefit-content p {
        font-size: 14px;
    }
}

/* Google Sign-In Button */
.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.divider-text {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
}

.google-signin-btn {
    width: 100%;
    padding: 12px 20px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.google-signin-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.google-signin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-logo {
    width: 20px;
    height: 20px;
}

.google-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
}
