/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal.visible,
.modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s forwards;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

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

.modal-content {
    background: var(--bg-dark);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    margin: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s ease;
}

/* Set max height for signup modal */
#signupModal .modal-content {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal.visible .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(var(--primary-rgb), 0.3), 
        rgba(var(--secondary-rgb), 0.3), 
        rgba(var(--accent-rgb), 0.3), 
        transparent);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: 1.5rem;
}

/* Add scrolling to signup modal body */
#signupModal .modal-body {
    overflow-y: auto;
    max-height: calc(80vh - 4rem); /* Account for header */
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Adjust icon position for signup form's smaller inputs */
#signupForm .input-icon {
    left: 0.8rem;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-feedback {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

/* More compact feedback for signup */
#signupForm .form-feedback {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    min-height: 1rem;
}

.form-feedback.error {
    color: var(--danger);
}

.form-feedback.success {
    color: var(--success);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 0.5rem;
}

.remember-me label {
    margin-bottom: 0;
    cursor: pointer;
}

.forgot-password {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary);
    text-decoration: underline;
}

.toggle-password {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: absolute;
    right: 1rem;
    transition: color 0.2s;
}

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

/* Buttons */
.btn-block {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* More compact button for signup form */
#signupForm .btn-block {
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Social login */
.social-login {
    margin-top: 2rem;
    text-align: center;
}

#signupModal .social-login {
    margin-top: 1rem;
}

.social-login p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    position: relative;
}

#signupModal .social-login p {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.social-login p::before,
.social-login p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 45%;
}

.social-btn i {
    margin-right: 0.5rem;
}

.social-btn.google {
    background-color: #ea4335;
}

.social-btn.google:hover {
    background-color: #cf3829;
}

.social-btn.twitter {
    background-color: #1da1f2;
}

.social-btn.twitter:hover {
    background-color: #0d8fd9;
}

.modal-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.modal-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.modal-switch a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.75rem;
}

#signupForm .password-strength {
    margin-top: 0.4rem;
}

.strength-meter {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

#signupForm .strength-meter {
    height: 3px;
    margin-bottom: 0.15rem;
}

.strength-meter::before {
    content: "";
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.strength-meter.weak::before {
    width: 25%;
    background-color: var(--danger);
}

.strength-meter.medium::before {
    width: 50%;
    background-color: var(--warning);
}

.strength-meter.strong::before {
    width: 75%;
    background-color: var(--info);
}

.strength-meter.very-strong::before {
    width: 100%;
    background-color: var(--success);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Terms checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

#signupForm .terms-checkbox {
    margin-bottom: 0.7rem;
}

.terms-checkbox input {
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.terms-checkbox label {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.4;
}

#signupForm .terms-checkbox label {
    font-size: 0.8rem;
    line-height: 1.3;
}

.terms-checkbox a {
    color: var(--primary);
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Demo CTA */
.demo-cta {
    text-align: center;
}

.demo-cta h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Success Modal */
.success-icon {
    text-align: center;
    font-size: 4rem;
    color: var(--success);
    margin: 1rem 0;
    animation: pulse 1.5s infinite;
}

.success-message {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Connect Account Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .modal {
    background: var(--bg-dark);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    margin: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.platform-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    position: relative;
}

.platform-option:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.platform-option i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.platform-option span {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.platform-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.platform-option[data-platform="instagram"] i { color: #E4405F; }
.platform-option[data-platform="facebook"] i { color: #1877F2; }
.platform-option[data-platform="twitter"] i { color: #1DA1F2; }
.platform-option[data-platform="linkedin"] i { color: #0A66C2; }
.platform-option[data-platform="tiktok"] i { color: #000000; }
.platform-option[data-platform="youtube"] i { color: #FF0000; }

.modal-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(var(--info-rgb), 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--info);
}

.modal-info i {
    color: var(--info);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.modal-info span {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .modal-content {
        max-width: 100%;
        margin: 1rem;
        height: auto;
        max-height: calc(100vh - 2rem);
    }
    
    .social-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .social-btn {
        width: 100%;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-option {
        padding: 1rem;
        min-height: 100px;
    }
    
    .platform-option i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}
