* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #333;
    min-height: 100vh;
}

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

header {
    background: #0a0a0a;
    border: 3px solid #1a3a1a;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3), inset 0 0 100px rgba(0, 255, 0, 0.05);
    position: relative;
}

.logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    padding: 10px 15px;
    background: #2a5298;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.settings-btn:hover {
    background: #1e3c72;
}

main {
    background: #0a0a0a;
    border: 3px solid #1a3a1a;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3), inset 0 0 100px rgba(0, 255, 0, 0.05);
    min-height: 400px;
    position: relative;
    overflow: hidden;
    font-family: 'Courier New', 'Consolas', monospace;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

main::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 2;
}

main * {
    position: relative;
    z-index: 3;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.location-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #00ff00;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #000000;
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.location-input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.location-input::placeholder {
    color: #00aa00;
    opacity: 0.8;
}

.generate-btn {
    padding: 12px 30px;
    background: #001a00;
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.generate-btn:hover {
    background: #003300;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.generate-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

.saved-reports-btn {
    padding: 12px 30px;
    background: #001a00;
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.saved-reports-btn:hover {
    background: #003300;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.saved-reports-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.spinner {
    border: 4px solid #001a00;
    border-top: 4px solid #00ff00;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.report-display {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 10px 20px;
    background: #001a00;
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.download-btn:hover {
    background: #003300;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.report-content {
    padding: 20px;
    background: #000000;
    border: 2px solid #00ff00;
    border-radius: 5px;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
}

.report-content::-webkit-scrollbar {
    width: 12px;
}

.report-content::-webkit-scrollbar-track {
    background: #001a00;
}

.report-content::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.report-content h1 {
    color: #00ff00;
    margin-bottom: 15px;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
    font-weight: bold;
}

.report-content h2 {
    color: #00ff00;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.7);
    font-weight: bold;
}

.report-content h3 {
    color: #00ff00;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 18px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
    font-weight: bold;
}

.report-content p {
    margin-bottom: 10px;
}

.report-content ul, .report-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.report-content strong {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.6);
}

.report-content hr {
    border: none;
    border-top: 2px solid #00ff00;
    margin: 20px 0;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
}

.report-content table th {
    background: #001a00;
    border: 1px solid #00ff00;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.report-content table td {
    border: 1px solid #00ff00;
    padding: 8px;
}

.report-content table tr:hover {
    background: rgba(0, 255, 0, 0.05);
}

.markdown-content {
    color: #00ff00;
}

.error-message {
    background: #000000;
    color: #ff0000;
    border: 2px solid #ff0000;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.7);
}

footer {
    text-align: center;
    color: #00ff00;
    padding: 20px;
    margin-top: 20px;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #0a0a0a;
    border: 3px solid #00ff00;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    animation: slideDown 0.3s;
    color: #00ff00;
}

.reports-modal {
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #00ff00;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.close:hover {
    color: #00cc00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 1);
}

.modal-content h2 {
    color: #00ff00;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
    font-family: 'Courier New', 'Consolas', monospace;
}

.reports-list {
    margin-top: 20px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Courier New', 'Consolas', monospace;
}

.reports-table thead th {
    background: #001a00;
    color: #00ff00;
    padding: 12px;
    text-align: left;
    border: 1px solid #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.reports-table tbody td {
    padding: 10px 12px;
    border: 1px solid #00ff00;
    color: #00ff00;
}

.reports-table tbody tr:hover {
    background: rgba(0, 255, 0, 0.1);
}

.view-report-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: #000000;
    border: 1px solid #00ff00;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    transition: all 0.3s;
}

.view-report-btn:hover {
    background: linear-gradient(135deg, #00cc00 0%, #009900 100%);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.no-reports {
    text-align: center;
    padding: 40px;
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 16px;
}

.modal-content h2 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 15px;
    color: #666;
}

.api-key-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 20px;
}

.api-key-input:focus {
    outline: none;
    border-color: #2a5298;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.save-btn {
    flex: 1;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.save-btn:hover {
    background: #45a049;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #da190b;
}

.settings-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.settings-message.success {
    background: #d4edda;
    color: #155724;
}

.settings-message.error {
    background: #f8d7da;
    color: #721c24;
}

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

    main {
        padding: 20px;
    }

    .input-section {
        flex-direction: column;
    }

    .location-input {
        width: 100%;
    }

    .generate-btn {
        width: 100%;
    }

    .settings-btn {
        position: static;
        display: block;
        margin-top: 10px;
        text-align: center;
    }
}
