/* Extended GeoCryption Styles - Part 2 */

/* Buttons */
.btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow:
        0 8px 20px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 30px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-next {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-next:hover {
    box-shadow: 
        0 12px 30px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-prev {
    background: rgba(71, 85, 105, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.8);
}

.btn-prev:hover {
    background: rgba(71, 85, 105, 0.8);
    box-shadow: 
        0 8px 20px rgba(71, 85, 105, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Map Styles */
.map-wrapper {
    margin: 30px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 20px;
}

.map-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.location-status {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.location-status.selected {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.location-coords {
    font-family: 'JetBrains Mono', monospace;
    color: #60a5fa;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Search */
.search-container {
    margin: 20px 0;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 1rem;
    margin-bottom: 15px;
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-name {
    color: #f1f5f9;
    font-size: 0.9rem;
}

/* Share/Result Styles */
.result-section {
    text-align: center;
    padding: 20px 0;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 20px;
}

.encrypted-link {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #60a5fa;
    word-break: break-all;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.encrypted-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.qr-code {
    margin: 30px 0;
    text-align: center;
}

.qr-code canvas {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Access Page */
.access-page {
    display: none;
    min-height: calc(100vh - 80px);
    padding-top: 100px;
    align-items: center;
    justify-content: center;
}

.access-container {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 32px;
    padding: 50px 40px;
    margin: 40px 20px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.access-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.5), transparent);
}

.locked-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.access-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.distance-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.distance-info h3 {
    color: #60a5fa;
    margin-bottom: 15px;
}

.distance-info p {
    margin-bottom: 8px;
    color: #cbd5e1;
}

.info-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 15px;
}

.content-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #f1f5f9;
    text-align: left;
    white-space: pre-wrap;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding: 50px 0 30px;
    margin-top: 80px;
    position: relative;
    z-index: 10;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #f1f5f9;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #60a5fa;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 15px;
}

.footer-logo .logo-icon {
    font-size: 1.8rem;
    margin-right: 10px;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding-top: 30px;
    text-align: center;
    color: #94a3b8;
}

/* Enhanced animations */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

/* Custom Leaflet popup styles */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
    margin: 12px 16px;
    color: #f1f5f9;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.5), transparent);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: rgba(71, 85, 105, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.8);
    color: #f1f5f9;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: rgba(71, 85, 105, 0.8);
    transform: scale(1.1);
}

.modal-body {
    color: #cbd5e1;
    line-height: 1.6;
}

.modal-body h3 {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 15px 0;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.contact-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    font-size: 1.3rem;
    margin-right: 12px;
    width: 30px;
}

.contact-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        padding: 40px 20px;
        margin: 20px 0;
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }

    .use-case-card {
        padding: 25px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-logo .logo-icon {
        font-size: 1.5rem;
    }

    .nav-actions {
        gap: 10px;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .step-screen {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .step-description {
        font-size: 0.9rem;
    }

    .app-title {
        font-size: 1.8rem;
        padding: 30px 20px 0 20px;
    }

    .app-subtitle {
        font-size: 1rem;
        padding: 0 20px 30px 20px;
    }

    .app-header::before {
        width: 100%;
        border-radius: 24px;
    }

    .app-header::after {
        width: 100%;
    }

    .progress-container {
        padding: 20px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .map-controls {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

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

    .access-page {
        padding-top: 100px;
    }

    .access-container {
        padding: 30px 20px;
        margin: 20px;
    }

    /* Modal responsive styles */
    .modal-content {
        padding: 30px 20px;
        margin: 10px;
        max-height: 90vh;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-body h3 {
        font-size: 1.1rem;
    }

    .contact-item {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .contact-icon {
        margin-bottom: 5px;
    }


}

/* File upload loading and dragover states */
.file-upload-area.loading {
    opacity: 0.7;
    pointer-events: none;
}

.file-upload-area.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.file-upload-area.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}



/* Spin animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
