/* CLANKER.WORKS - Remote Agent Specific Styles */

/* ===== Remote Agent Layout ===== */
.remote-agent-page {
    background: #000000;
}

.remote-main {
    position: relative;
    z-index: 10;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 1920px;
    margin: 0 auto;
}

/* ===== Network Visualization Background ===== */
.network-visualization {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.1;
}

.network-visualization::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 255, 255, 0.1) 50%, transparent 70%);
    animation: networkPulse 4s ease-in-out infinite;
}

@keyframes networkPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

/* ===== Device Grid Section ===== */
.device-grid-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.grid-header {
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #00FFFF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid-controls {
    display: flex;
    gap: 0.5rem;
}

.grid-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00FFFF;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
    transform: translateY(-2px);
}

/* ===== Device Grid ===== */
.device-grid {
    flex: 1;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    align-content: start;
}

.device-grid.layout-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.device-grid.layout-3x3 {
    grid-template-columns: repeat(3, 1fr);
}

.device-placeholder {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.placeholder-content {
    text-align: center;
    color: #696969;
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.connect-btn {
    margin-top: 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00FFFF;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.connect-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

/* ===== Device Card ===== */
.device-card {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    animation: deviceSlideIn 0.5s ease-out;
}

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

.device-card:hover {
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.device-card.selected {
    border-color: #FF0080;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.3);
}

.device-header {
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.device-icon {
    font-size: 1.5rem;
    color: #00FFFF;
}

.device-icon.fa-windows {
    color: #0078D4;
}

.device-icon.fa-apple {
    color: #A8B1B8;
}

.device-icon.fa-linux {
    color: #FCC624;
}

.device-details h4 {
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #F8F8FF;
}

.device-os {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #696969;
}

.device-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00FF00;
    animation: statusBlink 2s ease-in-out infinite;
}

.status-indicator.offline {
    background: #FF0040;
    animation: none;
}

.status-indicator.warning {
    background: #FFFF00;
}

/* ===== Device Stream ===== */
.device-stream {
    position: relative;
    height: 200px;
    background: #050505;
    overflow: hidden;
}

.device-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.stream-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.stream-placeholder {
    text-align: center;
    color: #696969;
}

.stream-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ===== Device Metrics ===== */
.device-metrics {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    justify-content: space-around;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.device-metrics .metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #00FFFF;
}

.device-metrics .metric i {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ===== Device Actions ===== */
.device-actions {
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.device-btn {
    flex: 1;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00FFFF;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

.device-btn.device-disconnect {
    background: rgba(255, 0, 64, 0.1);
    border-color: rgba(255, 0, 64, 0.3);
    color: #FF0040;
}

.device-btn.device-disconnect:hover {
    background: rgba(255, 0, 64, 0.2);
    border-color: #FF0040;
}

/* ===== Command Section ===== */
.command-section {
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.command-tabs {
    display: flex;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #696969;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.tab-btn:hover {
    color: #00FFFF;
    background: rgba(0, 255, 255, 0.05);
}

.tab-btn.active {
    color: #00FFFF;
    background: rgba(0, 255, 255, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #00FFFF;
}

.tab-content {
    padding: 1.5rem;
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Unified Command ===== */
.command-input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.command-targets {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.target-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #F8F8FF;
}

.target-label:hover {
    background: rgba(0, 255, 255, 0.2);
}

.target-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00FFFF;
}

.device-targets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.command-input-wrapper:focus-within {
    border-color: #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.command-prefix {
    color: #00FFFF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    padding: 0 0.5rem;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #F8F8FF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
}

.execute-btn {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00FF00;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.execute-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00FF00;
}

.command-suggestions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.suggestion-item {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #00FFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
}

/* ===== Individual Control ===== */
.individual-control {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.device-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.device-dropdown {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #F8F8FF;
    padding: 0.75rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    cursor: pointer;
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ===== Scripts Panel ===== */
.scripts-panel {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    height: 400px;
}

.script-list {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.script-list h3 {
    margin: 0 0 1rem 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    color: #00FFFF;
}

.script-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.script-item {
    padding: 0.75rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.script-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
}

.script-item.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

.new-script-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00FFFF;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.new-script-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

.script-editor {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.editor-header {
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.script-name {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #F8F8FF;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00FFFF;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

.script-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #F8F8FF;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: none;
}

/* ===== Activity Section ===== */
.activity-section {
    background: rgba(5, 5, 5, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 300px;
}

.activity-header {
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-title {
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #00FFFF;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-controls {
    display: flex;
    gap: 0.5rem;
}

.activity-btn {
    background: transparent;
    border: none;
    color: #00FFFF;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.activity-btn:hover {
    color: #F8F8FF;
}

.activity-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
}

.activity-log::-webkit-scrollbar {
    width: 6px;
}

.activity-log::-webkit-scrollbar-track {
    background: rgba(0, 255, 255, 0.05);
}

.activity-log::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.log-entry {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 2px solid transparent;
    animation: logSlide 0.3s ease-out;
}

.log-entry.command {
    border-left-color: #00FFFF;
    background: rgba(0, 255, 255, 0.05);
}

.log-entry.output {
    border-left-color: #00FF00;
    background: rgba(0, 255, 0, 0.05);
}

.log-entry.error {
    border-left-color: #FF0040;
    background: rgba(255, 0, 64, 0.05);
}

.log-device {
    color: #FF0080;
    font-weight: 600;
    margin-right: 0.5rem;
}

.log-timestamp {
    color: #696969;
    margin-right: 0.5rem;
}

.log-content {
    color: #F8F8FF;
}

/* ===== Device Connection Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #00FFFF;
}

.modal-close {
    background: transparent;
    border: none;
    color: #00FFFF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #FF0040;
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.connection-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-card {
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-card:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
    transform: translateY(-5px);
}

.method-card.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00FFFF;
}

.method-card i {
    font-size: 2rem;
    color: #00FFFF;
    margin-bottom: 0.5rem;
}

.method-card h3 {
    margin: 0.5rem 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    color: #F8F8FF;
}

.method-card p {
    margin: 0;
    font-size: 0.875rem;
    color: #696969;
}

.connection-details {
    display: none;
}

.connection-details.active {
    display: block;
}

/* ===== Responsive Design ===== */
@media (max-width: 1440px) {
    .device-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .remote-main {
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .scripts-panel {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .script-list {
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    .device-grid {
        grid-template-columns: 1fr;
    }
    
    .command-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 33.333%;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .activity-section {
        max-height: 200px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}