/* Main Stylesheet for Thanks But Nope */

/* CSS Variables */
:root {
    --bg-color: #f8f9fa;
    --container-bg: white;
    --text-color: #333;
    --input-bg: #fafbfc;
    --input-border: #e1e8ed;
    --input-focus-border: #667eea;
    --footer-bg: #f8f9fa;
    --footer-border: #e1e8ed;
    --footer-text: #666;
    --result-bg: #f8f9ff;
    --result-border: #667eea;
    --loading-text: #666;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --container-bg: #2d3748;
        --text-color: #e2e8f0;
        --input-bg: #4a5568;
        --input-border: #718096;
        --input-focus-border: #667eea;
        --footer-bg: #2d3748;
        --footer-border: #4a5568;
        --footer-text: #a0aec0;
        --result-bg: #374151;
        --result-border: #667eea;
        --loading-text: #a0aec0;
    }
    textarea::placeholder, input[type="text"]::placeholder { color: #cbd5e0; }
}

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

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 18px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 6px;
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.bookmark-instruction {
    font-size: 0.88em !important;
    opacity: 0.75;
    margin-top: 12px !important;
    margin-bottom: 0;
    cursor: default;
    transition: opacity 0.2s;
}

.bookmark-icon {
    margin-right: 5px;
}

/* Why Link */
.why-link {
    color: #dc3545;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    margin-left: 8px;
}

.why-link:hover {
    color: #c82333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--container-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--input-border);
}

.modal-header h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.8em;
}

.close {
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #dc3545;
}

.modal-body {
    color: var(--text-color);
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--text-color);
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.3em;
}

.modal-body p {
    margin-bottom: 15px;
}

.stat-highlight {
    background: var(--result-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.stat-highlight strong {
    color: #dc3545;
    font-size: 1.1em;
}

/* Special stat highlight variations */
.stat-highlight-blue {
    border-left-color: #2c3e50;
}

.stat-highlight-green {
    border-left-color: #28a745;
}

.stat-highlight-green strong {
    color: #28a745;
    font-size: 1em;
}

.testimonial-quote {
    color: #2c3e50 !important;
    font-size: 1em;
}

.vendor-response-attribution {
    opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
    .testimonial-quote {
        color: #66b3ff !important;
    }

    .footer a {
        color: var(--footer-text) !important;
    }
}

/* Form Container */
.form-container {
    padding: 40px 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1em;
}

/* Form Elements */
textarea, input[type="text"], select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--input-bg);
    color: var(--text-color);
}

textarea:focus, input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--container-bg);
}

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

/* Signature Options */
.signature-options {
    display: grid;
    gap: 15px;
}

.signature-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.signature-option:hover {
    border-color: var(--input-focus-border);
    background: var(--container-bg);
}

.signature-option.selected {
    border-color: var(--input-focus-border);
    background: var(--result-bg);
}

.signature-option input[type="radio"] {
    margin-top: 2px;
}

.signature-fields {
    margin-top: 15px;
    display: none;
}

.signature-fields.show {
    display: block;
}

/* Specific signature field styles */
#casual-name {
    margin-top: 10px;
}

#formal-signature {
    margin-top: 10px;
    min-height: 80px;
}

/* Character Counter */
.char-counter {
    font-size: 0.85em;
    color: var(--footer-text);
    text-align: right;
    margin-top: 5px;
}

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

/* Buttons */
.clear-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: #5a6268;
}

.submit-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(44, 62, 80, 0.3);
}

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

/* Results */
.result-container {
    margin-top: 30px;
    display: none;
    transition: all 0.3s ease;
}

.result-container.show {
    display: block;
    animation: slideInUp 0.4s ease-out;
}

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

.result-box {
    background: var(--result-bg);
    border: 2px solid var(--result-border);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.result-box-hidden {
    display: none;
}

.result-text {
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
    margin-bottom: 15px;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #6c757d;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--loading-text);
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: var(--footer-bg);
    padding: 20px 30px;
    text-align: center;
    color: var(--footer-text);
    border-top: 1px solid var(--footer-border);
}

.footer-text-main {
    font-size: 0.85em;
    margin-bottom: 10px;
}

.footer-link {
    color: #555555;
    text-decoration: underline;
    font-size: 0.85em;
}

.footer-text-credits {
    font-size: 0.68em;
    color: #888;
}

.footer-text-credits a {
    color: #888;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .bookmark-instruction {
        display: none;
    }

    .container {
        margin: 10px;
        border-radius: 8px;
    }

    .header {
        padding: 15px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .form-container {
        padding: 30px 20px;
    }
}

/* Security Badge Styles */
.security-badge-container {
    position: relative;
    display: inline-block;
    margin-left: 4px;
}

.security-badge {
    display: inline-block;
    cursor: pointer;
    font-size: 1rem;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.security-badge:hover {
    transform: scale(1.1);
}

.security-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.security-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
}

.security-badge-container:hover .security-tooltip {
    opacity: 1;
}

/* Security Modal Styles */
.security-rating-badge {
    text-align: center;
    margin: 30px 0;
}

.grade-circle {
    display: inline-block;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 50%;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 100px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.grade-text {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

.security-scanners {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scanner-link {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    margin-bottom: 12px;
}

.scanner-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #2c3e50;
    text-decoration: none;
}

.scanner-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1rem;
}

.scanner-description {
    color: #666;
    font-size: 0.9rem;
}

.security-note {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

/* Dark mode adjustments for security elements */
@media (prefers-color-scheme: dark) {
    .security-rating-badge .grade-text {
        color: #9ca3af;
    }

    .scanner-link {
        background: #2d3748;
        border-color: #4a5568;
    }

    .scanner-link:hover {
        border-color: #667eea;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .scanner-name {
        color: #667eea;
    }

    .scanner-description {
        color: #9ca3af;
    }

    .security-note {
        color: #9ca3af;
        border-top-color: #4a5568;
    }

    #securityModal .modal-body p {
        color: #e2e8f0;
    }
}

/* Privacy and Terms Page Styles */
.back-link {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    display: inline-block;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
}

.content {
    padding: 40px 30px;
}

.content h2 {
    color: var(--text-color);
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.content h2:first-of-type {
    margin-top: 0;
}

.content h3 {
    color: var(--text-color);
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.content ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.highlight-box {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.highlight-box h3 {
    color: var(--text-color);
    margin-top: 0;
}

.contact-info {
    background: var(--input-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid var(--border-color);
}

.effective-date {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.accept-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    margin: 20px auto;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}