/* Boot Sequence Styles */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.2;
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.boot-screen.hidden {
    display: none;
}

/* BIOS Screen */
.bios-screen {
    background: #000080;
    color: #ffffff;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    display: none;
    height: 100vh;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

.bios-screen.active {
    display: block;
}

.bios-header {
    text-align: center;
    border: 2px solid #ffffff;
    padding: 10px;
    margin-bottom: 20px;
}

.bios-info {
    margin: 10px 0;
}

.bios-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    border-top: 1px solid #ffffff;
    padding-top: 10px;
}

/* GRUB Screen */
.grub-screen {
    background: #300a24;
    color: #ffffff;
    padding: 40px 20px;
    display: none;
    position: relative;
    height: 100vh;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}

.grub-screen.active {
    display: block;
}

.grub-header {
    text-align: center;
    margin-bottom: 40px;
}

.grub-title {
    font-size: 18px;
    margin-bottom: 20px;
}

.grub-menu {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.grub-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.4;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

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

.grub-menu-item.selected {
    background: #ffffff;
    color: #300a24;
    font-weight: bold;
}

.grub-menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.grub-menu-item span {
    margin-right: 8px;
    flex-shrink: 0;
}

.grub-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    line-height: 1.5;
}

/* Boot Messages Screen */
.boot-messages {
    background: #000000;
    color: #ffffff;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 16px; /* Consistent line height for calculations */
    display: none;
    overflow: hidden; /* Hide main container scrollbars */
    height: 100vh;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
}

.boot-messages.active {
    display: block;
}

#boot-messages-container {
    height: 100%;
    overflow-y: auto; /* Allow vertical scrolling for user interaction */
    overflow-x: hidden; /* Hide horizontal scrollbar */
    position: relative;
    /* Hide scrollbars while keeping scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer and Edge */
}

/* Hide Webkit scrollbars */
#boot-messages-container::-webkit-scrollbar {
    display: none;
}

.boot-message {
    margin: 2px 0;
    opacity: 0;
    animation: fadeInMessage 0.3s ease-in forwards;
    white-space: nowrap; /* Prevent text wrapping for authentic terminal feel */
    overflow: hidden;
    text-overflow: ellipsis; /* Handle long lines gracefully */
}

.boot-message.ok {
    color: #00ff00;
}

.boot-message.warn {
    color: #ffff00;
}

.boot-message.info {
    color: #00ffff;
}

.boot-message.error {
    color: #ff0000;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Login Prompt Screen */
.login-screen {
    background: #300a24;
    color: #ffffff;
    padding: 40px;
    display: none;
    text-align: center;
    height: 100vh;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}

.login-screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.ubuntu-logo {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6600;
}

.login-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
    color: #cccccc;
}

.login-prompt {
    font-size: 14px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #555;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.login-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-button {
    padding: 12px 24px;
    border: 2px solid #ff6600;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-button:hover {
    background: #ff6600;
    color: #000000;
}

.login-button.primary {
    background: #ff6600;
    color: #000000;
}

.login-button.primary:hover {
    background: #ff8833;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px auto;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6600, #ffaa00);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
}

.countdown {
    font-size: 12px;
    color: #cccccc;
    margin-top: 10px;
}

/* Fade out animation */
.boot-screen.fade-out {
    animation: fadeOutBoot 1s ease-out forwards;
}

@keyframes fadeOutBoot {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Skip button */
.skip-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .boot-screen {
        font-size: 12px;
    }
    
    .bios-screen {
        padding: 10px;
        font-size: 14px;
    }
    
    .grub-screen {
        padding: 20px 10px;
    }
    
    .login-screen {
        padding: 20px;
    }
    
    .ubuntu-logo {
        font-size: 36px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-bar {
        width: 100%;
        max-width: 280px;
    }
    
    .login-prompt {
        max-width: 90%;
        padding: 15px;
    }
    
    /* GRUB Menu responsive fixes */
    .grub-menu {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .grub-menu-item {
        padding: 10px 15px;
        font-size: 12px;
        min-height: 40px;
        white-space: normal;
        line-height: 1.3;
    }
    
    .grub-footer {
        font-size: 10px;
        padding: 0 10px;
    }
}

/* Cursor blinking effect */
.blinking-cursor::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Boot message typing effect */
.typing-message {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #fff;
    animation: typing 1s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #fff; }
}
