/* PostBoostr-inspired styling with light theme */
:root {
    --linkedin-blue: #0A66C2;
    --linkedin-blue-hover: #004182;
    --accent-green: #7FC15E;
    --light-bg: #FFFFFF;
    --light-card: #FFFFFF;
    --light-gray: #F3F2EF;
    --medium-gray: #666666;
    --dark-gray: #333333;
    --text-dark: #000000;
    --text-light: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --error-red: #CC1016;
    --success-green: #057642;
    --border-light: #E0E0E0;
    --border-medium: #CCCCCC;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Styling */
.form-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Styling */
.user-form {
    background: var(--light-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.user-form:hover {
    box-shadow: var(--shadow-hover);
}

/* Section Styling */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-step {
    background: var(--linkedin-blue);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Input Styling */
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--linkedin-blue);
    background: var(--light-bg);
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--medium-gray);
}

input[readonly] {
    background: var(--light-gray);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Error and Help Text */
.error-message {
    color: var(--error-red);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.help-text {
    color: var(--medium-gray);
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

/* Hashtag Input Special Styling */
.hashtag-input-wrapper {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hashtag-input-wrapper:focus-within {
    border-color: var(--linkedin-blue);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

.hashtag-prefix {
    padding: 0.875rem 0 0.875rem 1rem;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1rem;
}

.hashtag-input-wrapper input {
    border: none;
    background: transparent !important;
    padding: 0.875rem 1rem 0.875rem 0;
    flex: 1;
    color: var(--text-primary);
}

.hashtag-input-wrapper input:focus {
    border: none;
    background: transparent !important;
    box-shadow: none;
    outline: none;
}

.hashtag-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(127, 193, 94, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--accent-green);
}

.hashtag-preview strong {
    color: var(--accent-green);
}

#hashtagDisplay {
    color: var(--accent-green);
    font-weight: 600;
}

/* Additional Emails */
.additional-emails {
    margin-bottom: 1rem;
}

.email-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.email-input-group input {
    flex: 1;
}

.remove-email {
    background: var(--error-red);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.remove-email:hover {
    background: #AA0E14;
    transform: scale(1.1);
}

.add-email-btn {
    background: transparent;
    color: var(--linkedin-blue);
    border: 2px dashed var(--linkedin-blue);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.add-email-btn:hover {
    background: rgba(10, 102, 194, 0.1);
    border-color: var(--linkedin-blue);
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-green);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(127, 193, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(127, 193, 94, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--light-gray);
    border-color: var(--border-medium);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 600px) {
    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Success Message */
.success-message {
    background: var(--light-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

.success-content {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    background: var(--success-green);
    color: var(--text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.success-message h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--light-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--medium-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
}

/* Validation States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-red);
    background: rgba(204, 16, 22, 0.1);
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: var(--success-green);
    background: rgba(5, 118, 66, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: var(--text-light);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .user-form {
        padding: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        padding: 1.5rem;
    }
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--linkedin-blue);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--linkedin-blue-hover);
}