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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #001484;
    min-height: 100vh;
    color: #334155;
    overflow: hidden;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tools-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-group label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
}

.tool-group input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 60px;
    text-align: center;
    background: white;
    transition: border-color 0.2s ease;
}

.tool-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #64748b;
}

.tool-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.tool-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.tool-btn svg {
    width: 20px;
    height: 20px;
}

main {
    flex: 1;
    position: relative;
    background: #001484;
}

#canvas {
    width: 100%;
    height: 100%;
    background: #001484;
    cursor: crosshair;
}

#canvas.drawing-mode {
    cursor: pointer;
}

#canvas.bond-mode {
    cursor: crosshair;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    min-width: 200px;
}

.context-menu-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.context-menu-item:last-child {
    margin-bottom: 0;
}

.context-menu-item label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.context-menu-item input {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

.input-button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-button-group input {
    flex: 1;
    margin: 0;
}

.input-button-group .context-btn {
    margin: 0;
    white-space: nowrap;
}

.context-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.context-btn:hover {
    background: #2563eb;
}

.context-btn.full-width {
    width: 100%;
    margin: 0;
}

.delete-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background: #b91c1c;
}

@media (max-width: 768px) {
    .tools-panel {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .tool-group {
        order: 2;
        width: 100%;
        justify-content: center;
    }
} 