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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 4rem; /* Extra space for env indicator */
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
    margin-bottom: 0;
}

.header-actions {
    margin-top: 1rem;
}

/* Main content */
.main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.input, .textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.input:focus, .textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input::placeholder, .textarea::placeholder {
    color: #9ca3af;
}

.textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* QR Code Result */
.qr-result {
    margin-top: 2rem;
}

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

.qr-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.qr-image {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.qr-info {
    text-align: center;
}

.qr-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #6b7280;
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    word-break: break-all;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #6b7280;
    line-height: 1.6;
}

/* Tracking Grid */
.tracking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.map-card {
    grid-column: 1 / -1;
}

.map {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

/* Submissions List */
.submissions-list {
    max-height: 400px;
    overflow-y: auto;
}

.submission-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

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

.submission-name {
    font-weight: 600;
    color: #1a1a1a;
}

.submission-location {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.submission-comment {
    color: #374151;
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.5;
}

.submission-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.loading {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    font-style: italic;
}

.error {
    text-align: center;
    color: #dc2626;
    padding: 2rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* Book Page Header Styles */
.book-description {
    margin: 2rem 0;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.book-description p {
    margin: 1rem 0;
    line-height: 1.7;
    color: #555;
    font-size: 1.05rem;
    font-weight: 400;
}

.book-description p:first-child {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.book-description p:last-child {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-weight: 500;
    color: #444;
    font-style: italic;
}

.top-cta {
    margin: 1.5rem 0;
    text-align: center;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* CAPTCHA Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.captcha-question {
    font-weight: 500;
    color: #333;
    font-size: 1.1rem;
    min-width: 80px;
}

.captcha-input {
    width: 120px;
    text-align: center;
    font-weight: 500;
}

/* Environment Indicator */
.env-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.env-indicator:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-bottom: 3rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .map {
        height: 300px;
    }
    
    .env-indicator {
        bottom: 5px;
        right: 5px;
        font-size: 0.6rem;
        padding: 3px 6px;
    }
}

@media (min-width: 1024px) {
    .tracking-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .map-card {
        grid-column: 1 / -1;
    }
} 