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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #333;
    min-height: 100vh;
    color: #333;
    overflow: hidden;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 0;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Control Panel */
.control-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.status-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-weight: 500;
    color: #495057;
}

.status-value {
    font-weight: 700;
    color: #007bff;
    background: #e3f2fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

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

/* Modern Button Styles */
.btn {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    width: 150px;
    height: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    font-weight: bold;
    font-size: 16px;
}

.btn:hover:not(:disabled) {
    background-color: #005BDD;
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
    background-color: #0026a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background-color: #6c757d;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background-color: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-main {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    margin: 20px 0;
    width: 300px;
    height: 60px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    font-weight: bold;
    font-size: 30px;
}

.btn-main:hover {
    background-color: #005BDD;
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-main:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* VM Container */
.vm-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* Screen Container - Full screen */
.screen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.screen-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    border: none;
    background: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Floating Controls */
.floating-controls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.floating-controls.hidden {
    opacity: 0.3;
    pointer-events: none;
}

.floating-controls:hover {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Status Display */
.status-display {
    color: #495057;
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 500;
    margin-right: 15px;
    white-space: nowrap;
    padding: 8px 12px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(222, 226, 230, 0.5);
}

/* Fullscreen mode */
.screen-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: #000;
}

.screen-container.fullscreen canvas {
    width: 100vw !important;
    height: 100vh !important;
}

/* Hide controls in fullscreen */
.screen-container.fullscreen ~ .floating-controls {
    display: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    color: white;
    font-family: 'Inter', sans-serif;
}

.loading-text {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-progress {
    width: 60%;
    max-width: 500px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.loading-details {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    opacity: 0.9;
    max-width: 80%;
    line-height: 1.5;
}

/* Terminal */
.terminal-container {
    margin-top: 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.terminal-header {
    background: #343a40;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.terminal-btn {
    background: #495057;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.terminal-btn:hover {
    background: #6c757d;
}

.terminal {
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 15px;
    height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

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

.info-section li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section strong {
    color: #007bff;
    min-width: 80px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    color: #666;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-panel {
        grid-template-columns: 1fr;
    }
    
    .screen-container canvas {
        min-width: 300px;
        min-height: 225px;
        max-width: 100%;
        max-height: 60vh;
    }
    
    .floating-controls {
        flex-wrap: wrap;
        max-width: 90vw;
        gap: 4px;
        padding: 10px 15px;
    }
    
    .btn {
        font-size: 11px;
        padding: 6px 12px;
        height: 32px;
        min-width: 70px;
    }
    
    .status-display {
        font-size: 10px;
        margin-right: 10px;
        margin-bottom: 5px;
    }
    
    .loading-text {
        font-size: 24px;
    }
    
    .btn-main {
        width: 250px;
        height: 50px;
        font-size: 16px;
        padding: 12px 30px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vm-container, .control-panel, .info-section {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
.terminal::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.terminal::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Loading Animation for Progress Bar */
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-fill {
    animation: progressPulse 2s ease-in-out infinite;
}

/* Hide unnecessary elements */
.vm-container, .terminal-container, .info-panel, .container, .header, .control-panel {
    display: none;
}

/* Distro Selection Grid */
.distro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.distro-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.distro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
}

.distro-card.selected {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.distro-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.distro-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.distro-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.distro-size {
    color: #888;
    font-size: 0.8rem;
    font-weight: 500;
}

.distro-card .btn {
    margin-top: 15px;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.distro-card:hover .btn,
.distro-card.selected .btn {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation for distro selection */
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Responsive adjustments for distro grid */
@media (max-width: 768px) {
    .distro-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .distro-card {
        padding: 20px;
    }
    
    .distro-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .distro-name {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .distro-info {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
}

/* Error and retry styling */
#distro_error {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
}

#retry_distros {
    margin-top: 15px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#retry_distros:hover {
    background: #c82333;
} 