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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ---- Login Screen ---- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: #e94560;
    letter-spacing: 2px;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1em;
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: #e94560;
    background: rgba(255, 255, 255, 0.12);
}

.login-error {
    color: #ff6b6b;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05em;
    font-weight: 600;
    color: white;
    background: #e94560;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #c73a52;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.login-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85em;
}

/* ---- Main App ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2.2em;
    color: #e94560;
    font-weight: 700;
    letter-spacing: 1px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1em;
    margin-top: 2px;
}

.logout-btn {
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: #e94560;
    color: #e94560;
}

.scripts-section h2 {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.info-text {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 30px;
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.script-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
}

.script-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

.script-card h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-size: 1.2em;
}

.script-card .description {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 0.95em;
}

.script-card .time {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85em;
    margin-bottom: 15px;
}

.run-btn {
    width: 100%;
    padding: 11px 24px;
    font-size: 0.95em;
    font-weight: 600;
    color: white;
    background: #e94560;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.run-btn:hover {
    background: #c73a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.run-btn:active {
    transform: translateY(0);
}

.run-btn:disabled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(233, 69, 96, 0.05);
    border-radius: 8px;
    border-left: 4px solid #e94560;
}

.status-section h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

#statusMessage {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.success-message {
    color: #51cf66;
    padding: 15px;
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid rgba(81, 207, 102, 0.2);
    border-radius: 6px;
    margin-top: 10px;
}

.error-message {
    color: #ff6b6b;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 6px;
    margin-top: 10px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9em;
}

/* Loading Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15% auto;
    padding: 40px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #e94560;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

#loadingText {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
}

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

    header h1 {
        font-size: 1.8em;
    }

    .scripts-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        margin: 0 16px;
        padding: 36px 28px;
    }

    .header-row {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
