﻿body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a2f1f 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

.container {
    background-color: #1a1a1a;
    padding: 0;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
    background: linear-gradient(135deg, #2d5a3d 0%, #1e3a2b 100%);
    padding: 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    border-bottom: 3px solid #4CAF50;
}

    .logo img {
        width: 180px;
        filter: drop-shadow(0 4px 12px rgba(76, 175, 80, 0.3));
    }

h1 {
    color: #4CAF50;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0 40px;
}

h2 {
    color: #4CAF50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Location Type Selection */
#locationTypeSelection {
    padding: 40px;
}

    #locationTypeSelection h2 {
        text-align: center;
        margin-bottom: 35px;
    }

    #locationTypeSelection .row {
        gap: 20px;
    }

    #locationTypeSelection button {
        padding: 20px;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        border: none;
    }

        #locationTypeSelection button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
        }

    #locationTypeSelection .btn-secondary {
        background: linear-gradient(135deg, #555 0%, #444 100%);
    }

        #locationTypeSelection .btn-secondary:hover {
            box-shadow: 0 8px 20px rgba(85, 85, 85, 0.4);
        }

/* Manmade Sub Selection */
#manmadeSubSelection {
    padding: 40px;
}

    #manmadeSubSelection h2 {
        text-align: center;
        margin-bottom: 35px;
    }

/* Form Styling */
#submissionForm {
    padding: 40px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #4CAF50;
    font-weight: 500;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        outline: none;
        border-color: #4CAF50;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    }

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

/* Tag Sections */
.tag-section {
    background-color: #242424;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #4CAF50;
}

    .tag-section h3 {
        color: #4CAF50;
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 20px;
        margin-top: 0;
    }

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.form-check {
    background-color: #2a2a2a;
    padding: 12px 16px;
    border-radius: 6px;
    border: 2px solid #333;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .form-check:hover {
        border-color: #4CAF50;
        background-color: #2f2f2f;
    }

.form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #4CAF50;
    flex-shrink: 0;
    order: 1;
}

.form-check-label {
    color: #e0e0e0;
    cursor: pointer;
    margin: 0;
    margin-left: 30px;
    font-size: 0.95rem;
    user-select: none;
    flex: 1;
    order: 2;
}

.form-check-input:checked + .form-check-label {
    color: #4CAF50;
    font-weight: 500;
}


/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    }

.btn-secondary {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(85, 85, 85, 0.4);
    }

/* File Upload */
.form-control-file {
    padding: 12px;
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .form-control-file:hover {
        border-color: #45a049;
        background-color: #2f2f2f;
    }

#imagePreview {
    gap: 15px;
    margin-top: 15px;
}

    #imagePreview > div {
        position: relative;
        width: 150px;
        height: 150px;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 2px solid #333;
    }

    #imagePreview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Premium Options */
.form-group.form-check.d-flex {
    background-color: #242424;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #FFD700;
    align-items: flex-start;
}

#premiumOptions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

    #premiumOptions label {
        margin-bottom: 0;
    }

#creditCost {
    width: 120px !important;
    display: inline-block !important;
}

/* Group Selection */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234CAF50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Text Muted */
.text-muted {
    color: #888 !important;
    font-size: 0.9rem;
    margin-top: 5px;
}

.text-danger {
    color: #ff6b6b !important;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Rate Limit Modal */
.rate-limit-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rate-limit-modal {
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
    border: 2px solid #dc3545;
}

.rate-limit-modal-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 25px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

    .rate-limit-modal-header h3 {
        margin: 0;
        font-weight: 600;
        font-size: 1.5rem;
    }

    .rate-limit-modal-header .icon {
        font-size: 3rem;
        margin-bottom: 10px;
    }

.rate-limit-modal-body {
    padding: 30px 25px;
    text-align: center;
}

    .rate-limit-modal-body p {
        font-size: 1.1rem;
        color: #c0c0c0;
        margin-bottom: 25px;
        line-height: 1.6;
    }

.rate-limit-modal-footer {
    padding: 20px 25px;
    text-align: center;
    border-top: 1px solid #333;
    border-radius: 0 0 12px 12px;
}

/* Mobile Popup */
.mobile-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    z-index: 10000;
    animation: mobilePopupSlideIn 0.5s ease-out;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

    .mobile-popup .icon {
        font-size: 1.2rem;
        margin-right: 8px;
    }

    .mobile-popup.fade-out {
        animation: mobilePopupFadeOut 0.5s ease-in forwards;
    }

/* Optional Natural Features Checkbox */
.natural-features-toggle {
    background-color: #242424;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    margin-bottom: 15px;
}

    .natural-features-toggle .form-check-label {
        font-size: 1rem;
        font-weight: 500;
    }

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobilePopupSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes mobilePopupFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

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

    #submissionForm,
    #locationTypeSelection,
    #manmadeSubSelection {
        padding: 20px;
    }

    .tag-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
        padding: 0 20px;
    }

    h2 {
        font-size: 1.3rem;
    }
}

@media (min-width: 769px) {
    .mobile-popup {
        display: none !important;
    }
}
#trailMapSection {
    margin-bottom: 1.5rem;
}

#trailMap {
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#routeInfo {
    font-weight: 600;
    color: #28a745;
}

.leaflet-container {
    font-family: inherit;
}

/* Make sure the map renders properly */
#trailMap .leaflet-control-container {
    font-size: 14px;
}

/* Trail tags section */
#trailTags {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

    #trailTags h3 {
        color: #28a745;
        margin-bottom: 1rem;
    }

    #trailTags .tag-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    #trailTags .form-group label {
        font-weight: 600;
    }

/* Button styling for trail controls */
#trailMapSection .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

#trailMapSection .btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

/* Hidden class utility */
.hidden {
    display: none !important;
}
/* Dark theme styling for Leaflet map */
#trailMap {
    background-color: #212121;
    border: 2px solid #3c3c3c;
    border-radius: 4px;
}

/* Customize Leaflet controls for dark theme */
.leaflet-control-zoom a,
.leaflet-control-layers-toggle {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    border: 1px solid #4e4e4e !important;
}

    .leaflet-control-zoom a:hover {
        background-color: #373737 !important;
    }

.leaflet-control-attribution {
    background-color: rgba(33, 33, 33, 0.8) !important;
    color: #757575 !important;
}

    .leaflet-control-attribution a {
        color: #9e9e9e !important;
    }

/* Customize popup styling for dark theme */
.leaflet-popup-content-wrapper {
    background-color: #2c2c2c;
    color: #bdbdbd;
    border: 1px solid #4e4e4e;
}

.leaflet-popup-tip {
    background-color: #2c2c2c;
}

/* Map container shadows for depth */
#trailMap {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* Style for route info display */
#routeInfo {
    color: #4CAF50;
    font-weight: 600;
    padding: 5px 10px;
    background-color: rgba(44, 44, 44, 0.8);
    border-radius: 4px;
    display: inline-block;
}
/* Quick Submit Form */
#quickSubmitForm {
    padding: 40px;
}

    #quickSubmitForm h1 {
        padding: 0;
        margin-bottom: 8px;
    }

    #quickSubmitForm p.text-muted {
        padding: 0;
        margin-bottom: 30px;
    }

#quickImagePreview {
    gap: 15px;
    margin-top: 15px;
}

    #quickImagePreview > div {
        position: relative;
        width: 150px;
        height: 150px;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 2px solid #333;
    }

    #quickImagePreview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Responsive quick submit */
@media (max-width: 768px) {
    #quickSubmitForm {
        padding: 20px;
    }
}