/* WLAN.Management - Yellow/Green Theme */
:root {
    /* Primary gradient colors - Yellow to Green */
    --primary-gradient-start: #ffd93d;
    --primary-gradient-end: #6bcf7f;
    
    /* Secondary colors */
    --secondary-color: #4299e1;
    --danger-color: #ff4444;
    --danger-hover: #cc0000;
    
    /* Background colors */
    --bg-primary: rgba(255, 255, 255, 0.95);
    --bg-secondary: rgba(255, 255, 255, 0.05);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Text colors */
    --text-primary: #333;
    --text-secondary: #666;
    --text-white: white;
    --text-dark: #2d3748;
    
    /* Border colors */
    --border-light: #e0e0e0;
    --border-medium: #ddd;
    
    /* Shadow colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    min-height: 100vh;
    overflow: hidden;
}

/* Container */
.container {
    display: flex;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    box-shadow: 4px 0 20px var(--shadow-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.app-title {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.device-palette {
    padding: var(--spacing-lg);
    flex: 1;
    overflow-y: auto;
}

.device-category {
    margin-bottom: var(--spacing-lg);
}

.device-category h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.device-item {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-sm);
    cursor: move;
    text-align: center;
    transition: all var(--transition-medium);
    user-select: none;
}

.device-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-light);
    border-color: var(--primary-gradient-end);
}

.device-item svg {
    width: 30px;
    height: 30px;
    margin-bottom: var(--spacing-xs);
}

.device-item span {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.5);
    margin-top: auto;
}

.footer-links {
    margin-bottom: var(--spacing-sm);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color var(--transition-fast);
    cursor: pointer;
}

.footer-link:hover {
    color: var(--primary-gradient-start);
    text-decoration: underline;
}

.copyright {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.8;
}


/* Canvas Area */
.canvas-area {
    flex: 1;
    position: relative;
    overflow: auto;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Toolbar */
.toolbar {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 50;
    align-items: center;
}

.tool-button {
    background: var(--bg-primary);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-medium);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.tool-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-medium);
    background: white;
}

.tool-button.active {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--text-dark);
    font-weight: 600;
}

/* Connect Tool Options */
.connect-tool-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.connect-options {
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.connect-options.show {
    display: flex;
}

.connect-options label {
    font-size: 12px;
    color: var(--text-secondary);
}

.connect-options input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.connect-options input[type="range"] {
    width: 80px;
}

/* Canvas */
#canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    min-width: 2000px;
    min-height: 2000px;
}

/* Network Device */
.network-device {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    cursor: move;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: box-shadow var(--transition-medium);
    min-width: 120px;
    text-align: center;
    user-select: none;
}

.network-device:hover {
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.network-device.selected {
    box-shadow: 0 0 0 3px var(--primary-gradient-end);
}

.network-device.connection-hover {
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.network-device svg {
    width: 40px;
    height: 40px;
    margin-bottom: var(--spacing-sm);
}

.device-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.device-info {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Connection Points */
.connection-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-gradient-end);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.network-device:hover .connection-point {
    opacity: 0.6;
}

.connection-point.top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.connection-point.bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.connection-point.left {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.right {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Connections */
.connection-group {
    pointer-events: all;
    cursor: pointer;
}

.connection-line {
    fill: none;
    pointer-events: stroke;
    transition: all var(--transition-medium);
}

.connection-line:hover {
    filter: brightness(1.2);
}

.connection-line.selected {
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3));
}

.connection-label {
    fill: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    text-anchor: middle;
}

.connection-label-bg {
    fill: white;
    stroke: none;
    opacity: 0.9;
    pointer-events: none;
}

.temp-connection {
    stroke: var(--secondary-color);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 5, 5;
    pointer-events: none;
    opacity: 0.8;
}

/* Properties Panel */
.properties-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px var(--shadow-light);
    transition: right var(--transition-medium);
    z-index: 200;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.properties-panel.active {
    right: 0;
}

.properties-panel h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.property-group {
    margin-bottom: var(--spacing-md);
}

.property-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.property-group input,
.property-group select,
.property-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.property-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 3px var(--text-primary);
}

/* Close Button */
.close-properties {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-properties:hover {
    background: var(--border-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px var(--shadow-heavy);
}

.modal-content h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.modal-content textarea {
    width: 100%;
    height: 100px;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.modal-buttons button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.modal-buttons .primary {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--text-dark);
    font-weight: 600;
}

.modal-buttons .secondary {
    background: #f5f5f5;
    color: var(--text-primary);
}

.modal-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

/* Delete Button */
.delete-button {
    background: var(--danger-color) !important;
    color: var(--text-white);
    margin-top: var(--spacing-lg);
    width: 100%;
    padding: var(--spacing-sm);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.delete-button:hover {
    background: var(--danger-hover) !important;
}

/* Tool Tip */
.tool-tip {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 150;
}

.tool-tip.active {
    opacity: 1;
}
