/* css/style.css */
:root {
    --background-color: #0a0a0a;
    --panel-bg-color: rgba(15, 15, 15, 0.85);
    --text-color: #00ffcc; /* Neon cyan/teal */
    --primary-color: #00ffcc;
    --secondary-color: #ff00ff; /* Neon magenta */
    --highlight-color: #ffff00; /* Neon yellow */
    --error-color: #ff4136; /* Neon red */
    --border-color: rgba(0, 255, 204, 0.5);
    --input-bg-color: rgba(0, 0, 0, 0.7);
    --button-bg-color: transparent;
    --button-hover-bg: rgba(0, 255, 204, 0.2);

    --font-primary: 'Orbitron', sans-serif; /* Futuristic font */
    --font-secondary: 'Roboto Mono', monospace; /* Monospaced font for code/data */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* background-image: url('../img/background.jpg');  你可以換成自己的背景圖 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden; /* Hide scrollbars initially */
    position: relative;
}

/* Particles Background */
#particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 1; /* 提高整体透明度 */
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float linear infinite;
    box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; /* 增强发光效果 */
    filter: blur(0.5px); /* 轻微模糊 */
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) translateX(var(--drift)) scale(1);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 450px; /* Adjust width as needed */
    padding: 20px;
    position: relative; /* Needed for screen positioning */
    z-index: 1; /* Above particles */
}

.screen {
    display: none; /* Hide all screens by default */
    width: 100%;
    position: absolute; /* Position screens on top of each other */
    top: 0;
    left: 0;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block; /* Show the active screen */
    position: relative; /* Take up space when active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
    backdrop-filter: blur(5px); /* Frosted glass effect */
}

.panel h1 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 0 0 10px var(--primary-color);
    font-size: 1.8em;
}

.panel h1 i {
    margin-right: 10px;
}


.panel p {
    text-align: center;
    margin-bottom: 20px;
    color: rgba(0, 255, 204, 0.8);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 0.9em;
    text-transform: uppercase;
}

.input-group label i {
    margin-right: 8px;
    width: 15px; /* Align icons */
    text-align: center;
}


.input-group input[type="text"],
.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 12px;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-secondary);
    box-sizing: border-box; /* Include padding and border in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.input-group select {
    appearance: none; /* Remove default dropdown arrow */
    background-image: linear-gradient(45deg, transparent 50%, var(--primary-color) 50%), linear-gradient(135deg, var(--primary-color) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px; /* Space for custom arrow */
}

/* Style option elements for better consistency */
.input-group select option {
    background-color: var(--background-color);
    color: var(--text-color);
}


button {
    width: 100%;
    padding: 15px;
    background-color: var(--button-bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
    min-height: 1.2em; /* Prevent layout shift */
}

/* Loading Screen Specific Styles */
.loading-panel {
    text-align: center;
}

#glitch-text {
    font-family: var(--font-secondary);
    font-size: 0.8em;
    color: var(--secondary-color);
    white-space: pre-wrap; /* Allow wrapping */
    word-wrap: break-word; /* Break long words */
    height: 100px; /* Fixed height for the text area */
    overflow: hidden;
    border: 1px dashed var(--border-color);
    padding: 10px;
    margin-bottom: 20px;
    background-color: rgba(0,0,0,0.3);
    line-height: 1.4;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease-in-out;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

#loading-status {
    font-size: 1em;
    margin-top: 15px;
}


/* Result Screen Specific Styles */
.result-item {
    margin-bottom: 15px;
    font-size: 1em;
    line-height: 1.6;
    border-bottom: 1px dashed rgba(0, 255, 204, 0.2);
    padding-bottom: 10px;
}
.result-item:last-of-type {
     border-bottom: none;
     padding-bottom: 0;
}

.result-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}

.result-item strong i {
    color: var(--primary-color); /* Icon for "Running" status */
}

.result-item span {
    color: var(--text-color);
    font-weight: bold;
}

.result-item span.success {
    color: #2ecc40; /* Neon green */
    font-weight: bold;
}
.result-item span.highlight {
    color: var(--highlight-color);
    font-weight: bold;
     text-shadow: 0 0 8px var(--highlight-color);
}


.purchase-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.purchase-section h3 {
     font-family: var(--font-primary);
     color: var(--secondary-color);
     margin-bottom: 15px;
     text-shadow: 0 0 5px var(--secondary-color);
}

.purchase-section div {
    display: inline-block;
    margin: 0 15px;
    text-align: center;
}

.result-icon {
    width: 40px; /* Adjust icon size */
    height: 40px;
    vertical-align: middle;
    margin-right: 5px;
    filter: drop-shadow(0 0 5px var(--primary-color));
}

.purchase-section span {
     font-size: 1.2em;
     font-weight: bold;
     color: var(--highlight-color);
}

#back-to-main {
    margin-top: 25px;
} 