:root {
    --vscode-blue: #007ACC;
    --vscode-dark-blue: #005A9E;
    --background: #f5f5f5;
    --surface: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    color: var(--vscode-blue);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.form-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--vscode-blue);
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.1);
}

/* Special styling when autocomplete is active */
.form-group input.has-suggestions {
    border-radius: 4px 4px 0 0;
    border-bottom-color: transparent;
    background: #fafbfc;
}

.form-group input.has-suggestions:focus {
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.15);
}

.btn {
    background: var(--vscode-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background: var(--vscode-dark-blue);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--background);
    color: var(--vscode-blue);
    border: 2px solid var(--vscode-blue);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--vscode-blue);
    color: white;
}

.version-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.version-autocomplete-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Autocomplete suggestions */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d9e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.suggestion-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f6f8fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
    background: white;
}

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

.suggestion-item:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-left: 3px solid #0969da;
    padding-left: 15px;
    transform: translateX(2px);
}

.suggestion-item.selected {
    background: linear-gradient(135deg, #0969da 0%, #0550ae 100%);
    color: white;
    border-left: 3px solid #ffffff;
    padding-left: 15px;
    transform: translateX(2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.suggestion-item:active {
    transform: translateX(1px) scale(0.98);
    transition: all 0.1s ease;
}

.version-number {
    font-weight: 600;
    color: #0969da;
    font-size: 1rem;
    transition: color 0.15s ease;
}

.suggestion-item:hover .version-number {
    color: #0550ae;
}

.suggestion-item.selected .version-number {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.release-date {
    font-size: 0.875rem;
    color: #656d76;
    font-weight: 500;
    transition: color 0.15s ease;
}

.suggestion-item:hover .release-date {
    color: #424a53;
}

.suggestion-item.selected .release-date {
    color: rgba(255, 255, 255, 0.9);
}

/* No suggestions state */
.no-suggestions {
    padding: 16px 18px;
    color: #656d76;
    font-style: italic;
    text-align: center;
    background: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
}

/* Loading indicator for input */
.input-loading {
    position: relative;
}

.input-loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0969da;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.version-search-container {
    display: flex;
    flex-direction: column;
}

.version-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.result {
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.result.success {
    border-left: 4px solid var(--success);
}

.result.error {
    border-left: 4px solid var(--error);
}

.result.warning {
    border-left: 4px solid var(--warning);
}

.result-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.download-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.download-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.download-link {
    display: inline-block;
    background: var(--background);
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--vscode-blue);
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.2s;
}

.download-link:hover {
    background: var(--border);
}

.error-message {
    color: var(--error);
    background: #ffe6e6;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: none;
}

/* Mobile Responsive Styles */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .version-options {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .download-links {
        grid-template-columns: 1fr;
    }
}

/* Console Section Styles */
.console-section {
    background: #1e1e1e;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #333;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.console-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #333;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-header h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.console-toggle {
    background: #444;
    color: #fff;
    border: 1px solid #555;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.console-toggle:hover {
    background: #555;
}

.console-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
    border-radius: 0 0 8px 8px;
}

.console-output:empty::before {
    content: "Waiting for status updates...";
    color: #666;
    font-style: italic;
}

.console-line {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.console-line:last-child {
    margin-bottom: 0;
}

/* Scrollbar styling for console */
.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.console-output::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile console adjustments */
@media (max-width: 600px) {
    .console-output {
        max-height: 300px;
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .console-header {
        padding: 0.5rem 0.75rem;
    }
}
