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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
nav {
    margin-bottom: 20px;
}

nav a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

/* Headers */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    font-weight: 300;
}

/* Landing page */
.landing-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-features ul {
    list-style: none;
    margin-bottom: 25px;
}

.card-features li {
    padding: 5px 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.card-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-search {
    background-color: #e74c3c;
    color: white;
}

.btn-search:hover {
    background-color: #c0392b;
}

/* Process steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.step {
    text-align: center;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 15px;
}

.step h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Search section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-form {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 20px auto 0;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Forms */
.submission-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

fieldset {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    padding: 0 10px;
    font-weight: 600;
    color: #2c3e50;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Notices */
.submission-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.submission-notice h3 {
    color: #856404;
    margin-bottom: 15px;
}

.submission-notice ul {
    color: #856404;
    margin-left: 20px;
}

/* Response messages */
.response {
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

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

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

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e1e8ed;
    color: #666;
}

.dev-only {
    margin-top: 10px;
    font-size: 12px;
}

.dev-only a {
    color: #e74c3c;
}

/* Help tooltips */
.field-help {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    user-select: none;
}

.help-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    width: 280px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, visibility 0.3s;
}

.help-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
}

.field-help:hover .help-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Source URLs styling */
.source-urls {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.source-url-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-url-group input {
    flex: 1;
}

.url-label {
    min-width: 60px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Character counter */
.char-counter {
    font-size: 12px;
    color: #666;
    float: right;
    margin-top: 5px;
}

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

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

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

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

/* Tracking result */
.tracking-info {
    background: #e8f6f3;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.tracking-id {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #27ae60;
    display: inline-block;
    margin: 10px 0;
}

.tracking-url {
    color: #2980b9;
    text-decoration: none;
    font-weight: 600;
}

.tracking-url:hover {
    text-decoration: underline;
}

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

    .action-cards {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    header h1 {
        font-size: 2em;
    }

    .card {
        padding: 20px;
    }

    .help-tooltip {
        width: 250px;
        left: -100px;
        transform: none;
    }

    .source-url-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .url-label {
        margin-bottom: 5px;
    }
}