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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    height: 100%;
    background-color: #000000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    max-width: 100vw;
    background-color: #000000;
}

/* CSS Variables for Theme Colors */
:root {
    --background: #000000;
    --foreground: #1a1a1a;
    --card: #ffffff;
    --card-foreground: #1a1a1a;
    --primary: #000000;
    --primary-foreground: #ffffff;
    --secondary: #ecf0f1;
    --secondary-foreground: #2c3e50;
    --muted: #ecf0f1;
    --muted-foreground: #7f8c8d;
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.bg-background {
    background-color: #000000;
}

.bg-primary {
    background-color: #000000;
}

.bg-card {
    background-color: var(--card);
}

.bg-green-500 {
    background-color: #10b981;
}

.bg-green-600 {
    background-color: #059669;
}

.text-primary-foreground {
    color: var(--primary-foreground);
}

.text-card-foreground {
    color: var(--card-foreground);
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

.text-green-400 {
    color: #34d399;
}

.text-green-500 {
    color: #10b981;
}

.text-white {
    color: #ffffff;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-5xl {
    font-size: 3rem;
}

.text-6xl {
    font-size: 3.75rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.leading-tight {
    line-height: 1.25;
}

.leading-relaxed {
    line-height: 1.625;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-2xl {
    max-width: 42rem;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Feature cards alignment */
.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Padding and Margin */
.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.p-8 {
    padding: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* Sizing */
.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

.w-auto {
    width: auto;
}

.w-full {
    width: 100%;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.h-auto {
    height: auto;
}

.h-full {
    height: 100%;
}

.max-w-md {
    max-width: 28rem;
}

/* Position */
.relative {
    position: relative;
}

/* Border */
.border-0 {
    border-width: 0;
}

.border-green-500 {
    border-color: #10b981;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-full {
    border-radius: 9999px;
}

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

.btn:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
}

.btn-outline:hover {
    background-color: currentColor;
    color: white;
}

/* Form Elements */
.input {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

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

/* Custom Checkbox Styling */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.custom-checkbox:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* Species Checklist Styling */
.species-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.species-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.species-checkbox-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

.species-checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.species-checkbox-item input[type="checkbox"]:checked + span {
    color: #10b981;
    font-weight: 600;
}

/* Other species input styling */
#other_species_input_section {
    margin-left: 2.25rem; /* Align with checkbox text */
}

#other_species_input_section .input {
    width: 100%;
    font-size: 0.875rem;
}


/* Utility classes */
.min-h-100 {
    min-height: 100px;
}

.resize-none {
    resize: none;
}

.cursor-pointer {
    cursor: pointer;
}

.opacity-75 {
    opacity: 0.75;
}

.mt-1 {
    margin-top: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.flex-1 {
    flex: 1;
}

.placeholder-primary-foreground-60::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.text-primary-foreground-80 {
    color: rgba(255, 255, 255, 0.8);
}

.border-primary-foreground-20 {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hover States */
.hover\:bg-green-500:hover {
    background-color: #10b981;
}

.hover\:bg-green-600:hover {
    background-color: #059669;
}

.hover\:text-white:hover {
    color: white;
}

/* Tally Button Styling */
.tally-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    display: inline-block;
}

.tally-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:mb-0 {
        margin-bottom: 0;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .lg\:text-4xl {
        font-size: 2.25rem;
    }
    
    .lg\:text-6xl {
        font-size: 3rem;
    }
    
    .sm\:flex-row {
        flex-direction: row;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
}

@media (min-width: 769px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:mb-0 {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lg\:text-4xl {
        font-size: 2.25rem;
    }
    
    .lg\:text-6xl {
        font-size: 3.75rem;
    }
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}