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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.form-section {
    padding: 24px 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: #e74c3c;
}

.optional {
    font-weight: normal;
    color: #888;
    font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.search-spinner.active {
    display: block;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.company-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.company-dropdown.active {
    display: block;
}

.company-item {
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.company-item:hover {
    background: #f5f7ff;
}

.company-item:last-child {
    border-bottom: none;
}

.company-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.company-snippet {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-url {
    font-size: 0.8rem;
    color: #27ae60;
    margin-top: 4px;
}

.contact-info {
    background: #f0f4ff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: none;
}

.contact-info.active {
    display: block;
}

.contact-info h3 {
    font-size: 0.9rem;
    color: #667eea;
    margin-bottom: 12px;
}

.contact-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.contact-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    font-size: 0.9rem;
}

.contact-value {
    color: #333;
    word-break: break-all;
    font-size: 0.9rem;
}

.contact-value a {
    color: #667eea;
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

.email-note {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    padding: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #856404;
    border-radius: 0 8px 8px 0;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-top: 6px;
}

.char-counter.warning {
    color: #e74c3c;
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #27ae60;
    color: white;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 30px 20px;
}

.blog-section {
    padding: 0 20px 24px;
}

.blog-section h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 16px;
}

.blog-post {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-post-company {
    font-weight: 600;
    color: #e74c3c;
}

.blog-post-date {
    font-size: 0.85rem;
    color: #888;
}

.blog-post-content {
    color: #444;
    line-height: 1.6;
}

.blog-post-author {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

.captcha-container {
    background: #fff8e1;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.captcha-question {
    font-weight: 600;
    color: #f39c12;
    margin-bottom: 10px;
}

.success-message,
.error-message {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message.active,
.error-message.active {
    display: block;
}

.no-results {
    padding: 14px 16px;
    color: #888;
    font-style: italic;
}

.api-error {
    padding: 14px 16px;
    color: #721c24;
    background: #f8d7da;
    border-radius: 0 0 10px 10px;
}

.config-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    margin: 20px;
    border-radius: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 20px 16px;
    }

    .blog-section {
        padding: 0 16px 20px;
    }

    .divider {
        margin: 24px 16px;
    }

    .contact-info-row {
        flex-direction: column;
        gap: 4px;
    }

    .contact-label {
        min-width: auto;
    }
}
