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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title i {
    margin-right: 15px;
    color: #ffd700;
    -webkit-text-fill-color: #ffd700;
}

.subtitle {
    margin-bottom: 20px;
    opacity: 0.9;
}

.subtitle p {
    margin: 5px 0;
}

.subtitle a {
    color: #4fc3f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.subtitle a:hover {
    color: #29b6f6;
}

.version {
    font-size: 0.9rem;
    opacity: 0.7;
}

.attribution {
    font-size: 1.1rem;
    font-weight: 500;
}

.donation-links {
    margin-top: 20px;
}

.donation-links p {
    margin-bottom: 10px;
    color: #4fc3f7;
}

.donate-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 16px;
    background: linear-gradient(45deg, #4fc3f7, #29b6f6);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
}

.donate-btn i {
    margin-right: 8px;
}

/* Section styles */
.section {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

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

/* Warning card */
.warning-card {
    text-align: center;
    padding: 40px;
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 15px;
    margin: 20px 0;
}

.warning-card h3 {
    color: #ffc107;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.warning-card h3 i {
    margin-right: 10px;
}

.warning-card p {
    margin: 15px 0;
    font-size: 1rem;
    line-height: 1.6;
}

.continue-btn {
    margin-top: 25px;
    padding: 12px 25px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.continue-btn i {
    margin-right: 8px;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
}

.loading-indicator i {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 20px;
}

.loading-indicator p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Selection grid */
.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .selection-grid {
        grid-template-columns: 1fr;
    }
}

.selection-card {
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.selection-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
}

.current-selection {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    opacity: 0.9;
}

.current-selection span {
    color: #4fc3f7;
    font-weight: 600;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.nightlord-btn,
.map-btn {
    padding: 12px 16px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nightlord-btn:hover,
.map-btn:hover {
    background: linear-gradient(45deg, #3498db, #2980b9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.nightlord-btn.active,
.map-btn.active {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Instructions */
.instructions-card {
    text-align: center;
}

.instructions-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #ffd700;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.instruction-item i {
    font-size: 1.5rem;
    color: #4fc3f7;
    min-width: 24px;
}

.instruction-item span {
    font-weight: 500;
}

.reset-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.reset-btn i {
    margin-right: 8px;
}

.cv-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    display: inline-block;
}

.cv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.cv-btn i {
    margin-right: 8px;
}

.cv-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.help-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.help-btn i {
    margin-right: 8px;
}

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.seed-counter {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seed-counter h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffd700;
}

.seed-count {
    font-size: 3rem;
    font-weight: 700;
    color: #4fc3f7;
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.seed-count.no-seeds {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 600;
}

.map-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.overlay-message {
    text-align: center;
    color: #ffffff;
}

.overlay-message i {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 15px;
    display: block;
}

.overlay-message p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.overlay-message small {
    font-size: 0.9rem;
    opacity: 0.7;
    display: block;
}

/* Context Menu Styles */
.context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.context-menu-item:hover {
    background: rgba(79, 195, 247, 0.1);
    color: #0066cc;
}

.context-menu-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

#map-canvas {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    background: #2b2b2b;
    max-width: 100%;
    height: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
}

#seed-image-container {
    text-align: center;
}

#seed-image-container img {
    max-width: 100%;
    border: 2px solid #ffd700;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
}

.seed-details {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seed-details h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffd700;
    text-align: center;
}

.seed-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    padding: 20px;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.info-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #4fc3f7;
}

.info-card p {
    font-weight: 500;
    line-height: 1.5;
}

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

    .title {
        font-size: 2rem;
    }

    .section {
        padding: 20px;
    }

    .selection-card {
        padding: 20px;
    }

    .button-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .nightlord-btn,
    .map-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

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

    .instruction-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 195, 247, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 195, 247, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 195, 247, 0);
    }
}

.active-poi {
    animation: pulse 2s infinite;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.modal-header h3 i {
    margin-right: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    color: #fff;
}

.help-section h4 {
    color: #4fc3f7;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section h4:first-child {
    margin-top: 0;
}

.help-section p,
.help-section li {
    line-height: 1.6;
    margin-bottom: 10px;
    opacity: 0.9;
}

.help-section ol,
.help-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.help-section ul ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

.help-section strong {
    color: #ffd700;
    font-weight: 600;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.5);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.7);
}