/* =========================================================================
   ACTION1 REMOTE CONTROL - STYLESHEET
   Aesthetics: Deep Dark Glassmorphism, Neon Accents, Micro-animations
   ========================================================================= */

/* ── 1. THEME TOKENS (Variables) ── */
:root {
    --bg-dark: #07050f;
    --bg-surface: rgba(18, 14, 36, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 242, 254, 0.4);
    
    /* Neon HSL Accent Colors */
    --neon-blue: hsl(190, 100%, 50%);
    --neon-purple: hsl(280, 100%, 60%);
    --neon-green: hsl(145, 100%, 45%);
    --neon-red: hsl(355, 100%, 50%);
    --neon-gold: hsl(45, 100%, 50%);
    
    /* Text HSL Colors */
    --text-primary: hsl(220, 40%, 95%);
    --text-secondary: hsl(220, 20%, 65%);
    --text-muted: hsl(220, 15%, 45%);
    
    /* Font Stack */
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Shadows */
    --shadow-neon: 0 0 20px rgba(0, 242, 254, 0.15);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* iOS Notch Safe Area Support */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── 2. BASE RESET & INITIALIZATION ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Disable tap highlight on mobile */
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Customize */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── 3. AMBIENT BACKGROUND GLOWS ── */
.bg-glow {
    display: none; /* Removed all background glow gradients */
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #08060f; /* Darker solid background for better card contrast */
    z-index: -3;
}

@keyframes glow-float {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-45%, -55%) scale(1.2); }
}

/* ── 4. GLASSMORPHISM UTILITY ── */
.glass {
    background: #17122b; /* Slightly lighter solid card background for high contrast */
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.14); /* Brighter border to stand out */
    border-radius: 6px; /* Reduced border radius, slightly relaxed from 3px */
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12); /* 3D top edge highlight and deep shadow */
}

/* ── 5. SCREEN LAYOUT SYSTEM ── */
#app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 1;
}

/* ── 6. SCREEN 1: LOGIN STYLING ── */
#login-screen {
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-card); /* No gradient/cyan glow */
    animation: card-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 32px;
}

.logo-glow {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.05); /* Flat background */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Flat border */
    border-radius: 6px; /* Reduced border radius, slightly relaxed from 3px */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none; /* No gradient glow */
}

.logo-icon {
    font-size: 28px;
    color: var(--neon-blue); /* Neon blue color icon */
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff; /* Solid white text, no gradient */
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Inputs */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group label i {
    margin-right: 6px;
    color: var(--neon-blue);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: none; /* No gradient glow */
    background: rgba(0, 0, 0, 0.4);
}

/* Autofill Overrides for Dark Glassmorphism Theme */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover, 
.input-group input:-webkit-autofill:focus, 
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 100px rgba(10, 8, 20, 0.95) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
    border: 1px solid var(--border-color) !important;
    caret-color: var(--text-primary) !important;
}

.input-group input:-webkit-autofill:focus {
    border-color: var(--neon-blue) !important;
    -webkit-box-shadow: 0 0 0 100px rgba(10, 8, 20, 0.95) inset !important; /* No gradient glow */
}

.remember-group {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
    margin-top: -8px;
}

.remember-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--neon-blue);
    cursor: pointer;
}

.error-msg {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
    color: #f87171;
    font-size: 13px;
    animation: shake 0.3s ease-in-out;
}

.error-msg.hide {
    display: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ── 7. SCREEN 2: DASHBOARD HEADER ── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14); /* Pronounced border */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); /* Pronounced shadow */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header-left .sub-text {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--neon-green);
    box-sizing: border-box;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    animation: indicator-pulse 2s infinite;
}

@keyframes indicator-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--neon-blue); /* Solid cyber cyan */
    color: #07050f; /* High contrast dark text */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Solid shadow, no glow gradient */
}

.btn-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.15);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px; /* Reduced border radius to match style, slightly relaxed from 3px */
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-icon:active {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── 8. DASHBOARD CONTENT ── */
.dashboard-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-intro {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.greeting-box h3 {
    font-size: 22px;
    font-weight: 700;
}

.greeting-box h3 span {
    color: var(--neon-blue);
}

.date-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #17122b;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stat-card i {
    font-size: 20px;
}

.text-cyan { color: var(--neon-blue); }
.text-green { color: var(--neon-green); }

.pulse-icon {
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── 9. AUTOMATIONS CONTROL PANEL ── */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title-bar h3 {
    font-size: 16px;
    font-weight: 600;
}

.refresh-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auto-refresh-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.auto-refresh-label input {
    accent-color: var(--neon-blue);
}

#refresh-btn {
    padding: 8px 12px;
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
}

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    gap: 12px;
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
    background: #100c20;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
}

.search-bar:focus-within {
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.12), inset 0 0 10px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.25);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 14px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
}

/* ── 10. AUTOMATIONS GRID & CARDS ── */
.automations-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.automation-card {
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.automation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: var(--transition-smooth); /* Smooth width/color transition */
}

/* Side Borders based on Status */
.automation-card.idle::before {
    background: var(--text-muted);
}

.automation-card.running::before {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: side-pulse 1.5s infinite alternate;
}

/* Hover effects for left color bar */
.automation-card:hover::before {
    width: 6px; /* Expand slightly on hover */
}

.automation-card.idle:hover::before {
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.automation-card.running:hover::before {
    box-shadow: 0 0 15px var(--neon-green);
}

@keyframes side-pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.automation-card.running {
    border-color: rgba(34, 197, 94, 0.2);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-title-group h4 {
    font-size: 16px;
    font-weight: 600;
}

.category-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px; /* Reduced border radius, slightly relaxed from 2px */
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px; /* Reduced border radius, slightly relaxed from 2px */
}

.card-status.idle {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.card-status.running {
    background: rgba(34, 197, 94, 0.1);
    color: var(--neon-green);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.idle { background-color: var(--text-secondary); }
.status-dot.running { 
    background-color: var(--neon-green); 
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checked-time {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Action button trigger inside card */
.btn-trigger {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px; /* Reduced border radius, slightly relaxed from 3px */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-trigger.btn-idle {
    background: rgba(0, 242, 254, 0.08); /* Solid background, no gradient */
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--neon-blue);
}

.btn-trigger.btn-idle:active {
    background: rgba(0, 242, 254, 0.18);
    transform: scale(0.97);
}

.btn-trigger.btn-running {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--neon-green);
    cursor: not-allowed;
}

/* Loading Spinner state */
.loading-state {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    grid-column: 1 / -1; /* Span all columns in grid layout to center correctly */
    width: 100%;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ── 11. PREMIUM TOAST NOTIFICATION ── */
#toast-container {
    position: fixed;
    bottom: calc(24px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse; /* Stack newest toast at the bottom */
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
    align-items: center;
}

.toast {
    padding: 14px 20px;
    border-radius: 6px; /* Reduced border radius, slightly relaxed from 4px */
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(20px); /* Slide in from below */
    opacity: 0;
    animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
    width: 100%;
}

@keyframes toast-in {
    to { transform: translateY(0); opacity: 1; }
}

.toast.success {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--text-primary);
}
.toast.success i { color: var(--neon-green); }

.toast.error {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--text-primary);
}
.toast.error i { color: var(--neon-red); }

.toast.info {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}
.toast.info i { color: var(--neon-blue); }

/* ── 12. CONFIRMATION DIALOG MODAL ── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hide {
    display: none;
    opacity: 0;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    animation: modal-zoom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes modal-zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-warn-icon {
    font-size: 24px;
    color: var(--neon-gold);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-body {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.target-details {
    margin-top: 14px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.target-details h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.target-details p {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ── 13. RESPONSIVE BREAKPOINTS (CSS GRID) ── */
@media (min-width: 768px) {
    .dashboard-content {
        padding: 40px;
        max-width: 1140px;
        margin: 0 auto;
        width: 100%;
    }
    
    .dashboard-intro {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        width: 380px;
        gap: 16px;
    }
    
    .automations-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .automation-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* ── 14. PREMIUM ENHANCEMENTS & HOVER EFFECTS ── */
.automation-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.automation-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.8), 
                0 0 0 1px rgba(0, 242, 254, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.automation-card.running:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.8), 
                0 0 0 1px rgba(34, 197, 94, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Staggered Card Entry Animation */
.fade-in-card {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Interactive elements transitions */
.btn-primary {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); /* Flat shadow, no glow gradient */
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-trigger {
    transition: transform 0.2s ease, border-color 0.3s ease, background 0.3s ease;
}

.btn-trigger:hover:not(:disabled) {
    transform: scale(1.05);
    border-color: var(--neon-blue);
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(144, 24, 255, 0.18));
}

